javascript - Show geoJSON properties in jQuery Mobile Panel -
first off i'm novice @ js please bear me if simple task complete.
i'm using stock leafletjs popup bubble display properties geojson. however, utilize jquery mobile panel display properties geojson file when clicked on, similar openlayers example here. in advance!
update:
here js using load geojson stock popup leaflet:
$.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 layer on/off); });
i using jquery mobile display multiple maps , right working fine geojson has lot of data need show appreciated.
yes possible.
simply use:
marker.on("click",popmobilepanel); function popmobilepanel(event){ //make modal appear }
Comments
Post a Comment