Select to view content in your preferred language

Popup and MouseOver

5294
2
03-09-2015 12:40 PM
Labels (1)
by Anonymous User
Not applicable

So I started with this code as a template for my map: Simplifying complex features | Esri Leaflet

It was working well with my layer, but then I went and added three lines from this pop-up example, Custom popups | Esri Leaflet, and the dang thing just broke.

 

Here is my code: http://cryptb.in/a7tnfM   (this should work now)

 

Am I not able to have a mouse over display box and a pop-up at the same time? The strange thing though is that even when I commented out the bindPopup function in my code it still kills my map.

0 Kudos
2 Replies
JeffMitzelfelt
Regular Contributor

I wasn't able to open your code (it just kept saying "Retrieving Paste")

I copied the code from the mouse hover to a jsbin and added in the bindPopup code and got it to work.

The only snag I bumped into was when I was making the popup I selected a field that was not being returned in the feature.properties. I put a console.log(feature.properties) and discovered that the STATE was not being returned. When the STATE field was included the features were not being displayed.

Be sure to check the console on your browser to see if there are any error messages displaying that might give you a clue as to what is going on. (Chrome, Firefox, IE hit F12 for developer tools)

by Anonymous User
Not applicable

Thanks for the help. My issue was that I forgot to put in the layer field being used in bindPopup above when I defined the layer properties for 'LMI_lands'. Now I just gotta figure out how to embed this sucker into another web page.

0 Kudos