Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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],
        L.geoJson(data, {
          style: style,
           onEachFeature: function (feature, layer){
             if ( == 0){
                 return layer.bindPopup("<b><em>" + + "</em> LABEL<br />LABEL</b>");}
                else if ( == 1){
                         return layer.bindPopup("<b><em>" + + "</em> LABEL<br />" + + " label</b>");}
                else {
                      return layer.bindPopup("<b><em>" + + "</em> LABEL<br />" + + " label</b>");
                        }).addTo(GROUPLAYER FOR LAYER ON/OFF);
share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.