Jump to content

aasdelat

Inactive Members
  • Posts

    1
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

aasdelat's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hello, all: I have to use a map interactively: the user clicks on a position, and a new graph comes up with information about that point. I have to use R to generate the secondary graphs (not a map), but the first one (a map) is already created. So, I think that the best solution is to use the SpiderMoneky package to comunicate between R and JavaScript. Is this a good idea?. But now the problem: I coded the following html page: <html> <head> <script src="jquery.min.js"></script> <script src="raphael-min.js"></script> <script src="kartograph.min.js"></script> <script type="text/javascript"> function loadMap(){ var map = kartograph.map('#map', 600, 0); map.loadMap('map.svg', function() { map.addLayer('page'); }); } </script> </head> <body onLoad="loadMap()"> <div id="map"></div> </body> </html> The file map.svg can be downloaded from here. But the code above, doesn't display anything. However, if I use the this file instead, and change the code accordingly (map.svg -> DEU.svg and page -> admin1) it is correctly displayed. Perhaps there is a difference between the two files that makes necessary to write some other commands in order to load the first one (map.svg) correctly. Does anybody know the reason for Kartograph.js to not to display map.svg?. Is theer a better approach to this problem (interactive map in R)?. Thaks a lot in advance.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.

Disable-Adblock.png

 

If you enjoy our contents, support us by Disable ads Blocker or add GIS-area to your ads blocker whitelist