简体   繁体   中英

Can't get Leaflet geoJSON layer to display

First attempt to use Leaflet geoJSON for polygons. GeoJSON file looks good. To keep it simple, coded this way:

var map = L.map( 'map', {
    center: [47.5, -121.95],
    minZoom: 10,
    zoom: 10,
    layers: [streets],

});

var myStyle = {
"color": "#ff7800",
"weight": 5,
"opacity": 0.65

};

L.geoJson(kcdfp_parcel, {
style: myStyle}).addTo(map);

None of the polygons display. There are no errors indicated by FireBug.

Am I missing something?

使用L.geoJSON而不是L.geoJson

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM