首先我是JS的新手,所以如果这是一项简单的任务,请耐心等待。在jQuery Mobile Panel中显示geoJSON属性
我正在使用存货LeafletJS popup bubble来显示我的geoJSON中的属性。但是,我想利用jQuery Mobile Panel在单击时显示geoJSON文件中的属性,它与OpenLayers示例here类似。提前致谢!
UPDATE:
这里是我使用加载以GeoJSON以及股票弹出从单张的JS:
$.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);
});
我使用jQuery Mobile的显示多个图表现在一切正常,但geoJSON有很多数据,我需要显示,所以任何帮助,这将不胜感激。
u能告诉我们一些代码? – krishgopinath