3

I tried a bit around and created a simple map with two polygons(most of the code I got from the Interactive Choropleth Map Tutorial). I added a "L.control()" to show information about the polygons in a div. Contrary to the tutorial I would like to have this div outside the map.

To get a clue what I mean please look here: http://jsfiddle.net/Tbr9p/

3

Here you go. You just call the update method on the outside div, not the L.control element. I used JQuery for easier selection of the div.

  • Second. Nice example. – Barrett Jan 22 '14 at 17:29
  • Thanks for your help @zimmi. I got it work now link – Sancho Pansen Jan 22 '14 at 17:30
0

This is also an answer - you can use the appendTo function:

$("#source") .appendTo("#destination");

I found the answer here on Stackoverflow:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.