Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

First off I'm a novice at JS so please bear with me if this is a simple task to complete.

I'm currently using the stock LeafletJS popup bubble to display the properties from my geoJSON. However, I would like to utilize the jQuery Mobile Panel to display the properties from my geoJSON file when it is clicked on, it is similar to the OpenLayers example here. Thanks in advance and below is my code for loading the geoJSON!

$.getJSON(dict[geoJSON Variable Goes here],
      function(data){
        L.geoJson(data, {
          style: style,
           onEachFeature: function (feature, layer){
             if (feature.properties.SOMETHING == 0){
                 return layer.bindPopup("<b><em>" + feature.properties.Name + "</em> LABEL<br />LABEL</b>");}
                else if (feature.properties.Attacks == 1){
                         return layer.bindPopup("<b><em>" + feature.properties.Name + "</em> LABEL<br />" + feature.properties.SOMETHING + " label</b>");}
                else {
                      return layer.bindPopup("<b><em>" + feature.properties.Name + "</em> LABEL<br />" + feature.properties.SOMETHING + " label</b>");
                                }
                            },
                        }).addTo(GROUPLAYER FOR LAYER ON/OFF);
                    });
share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.