我对新的宣传单版本1.2.0有一种奇怪的行为。
使用0.7.7版本,我可以点击"内部"下面的功能,但不是1.2.0。
我尝试在每个图层上订阅click / mouseover,但事件仅在不在整个几何体上的线上引发。
<!DOCTYPE html>
<html>
<head>
<title>GeoJSON tutorial - Leaflet</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://unpkg.com/leaflet@1.2.0/dist/leaflet.css" rel="stylesheet"/>
<script src="https://unpkg.com/leaflet@1.2.0/dist/leaflet.js"></script>
<style>
#map {
width: 600px;
height: 400px;
}
</style>
</head>
<body>
<div id='map'></div>
<script>
var map = L.map('map').setView([0, 0], 4);
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {
maxZoom: 18,
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
'Imagery © <a href="http://mapbox.com">Mapbox</a>',
id: 'mapbox.light'
}).addTo(map);
function onEachFeature(feature, layer) {
var popupContent = "<p>I started out as a GeoJSON " +
feature.geometry.type + ", but now I'm a Leaflet vector!</p>";
if (feature.properties && feature.properties.popupContent) {
popupContent += feature.properties.popupContent;
}
layer.bindPopup(popupContent);
}
var demo = {
"type": "Feature",
"properties": {
"popupContent": "This is the Auraria West Campus",
"style": {
weight: 2,
color: "#999",
opacity: 1,
fillColor: "#B0DE5C",
fillOpacity: 0.8
}
},
"geometry": {"type":"MultiPolygon","coordinates":[[[[-0.43002011405222973,-10.2822214314305],[-0.73002011405222955,-10.2822214314305],[-0.73002011405222955,-10.427219595863601],[-3.7949483976304998,-10.427219595863601],[-3.7949483976304998,-10.697228440261199],[-3.7949483976304998,-11.797228385639098],[-6.2149487404503194,-11.797228385639098],[-6.2149487404503194,-10.632230577203998],[-6.8524471842921191,-10.632229432794826],[-7.1773201800049975,-10.618045171476471],[-7.4997206960568246,-10.575600338314761],[-7.8171950698496877,-10.505217964118952],[-8.1273271297027563,-10.40743370125471],[-8.4277565833776897,-10.282991747006193],[-8.7161969813277587,-10.132839179785332],[-8.9904531179594898,-9.9581187512932772],[-9.2484377384727328,-9.7601601894899339],[-9.4881874241300075,-9.5404700785612739],[-9.7078775350586426,-9.3007203929039761],[-9.905836096861961,-9.0427357723907136],[-10.080556525353987,-8.7684796357589647],[-10.230709092574816,-8.4800392378088816],[-10.355151046823305,-8.1796097841339339],[-10.452935309687511,-7.8694777242808556],[-10.523317683883288,-7.5520033504879862],[-10.565762517044963,-7.2296028344361538],[-10.57994677836329,-6.9047298387232701],[-10.565762195536575,-6.5798533669543531],[-10.523316435823251,-6.2574494560268477],[-10.452932544044781,-5.9399718472461558],[-10.355146195658687,-5.6298367889758829],[-10.230701619857003,-5.3294046471326233],[-10.080545935410704,-5.0409619409890034],[-9.905821942368668,-4.7667039410064369],[-9.7078594244718417,-4.5087179611413717],[-9.4881650284779653,-4.2689674727834159],[-9.2484107974229453,-4.0492771612305276],[-8.9904214450895239,-3.8513190384328695],[-8.7161604685343921,-3.6765997176981067],[-8.427715204367999,-3.5264489472073421],[-8.1272809425202723,-3.402009489610478],[-7.8171442183987061,-3.304228424725018],[-7.4996654105982934,-3.2338499415315063],[-7.1772607766081107,-3.191409674323971],[-6.8523840632366095,-3.1772306261216983],[-6.5299710033195995,-3.1772306261216983],[-6.5299710033195995,-2.8322306261216994],[-6.5299710033195995,-2.7472166084602989],[-6.49701022431766,-2.7472166084602989],[-0.22301112112909927,-2.7472166084602989],[-0.21526289249859953,-2.7472166084602989],[-0.070001521129099409,-2.7472166084602989],[0.55510678301988037,-2.7472166084602989],[0.55510678301988037,-4.5272171375912009],[0.83510707489636005,-4.5272171375912009],[0.83510707489636005,-10.427219595863601],[-0.43002011405222973,-10.427219595863601],[-0.43002011405222973,-10.2822214314305]],[[-0.43002011405231944,-6.4822017754958985],[-0.73002011405231926,-6.4822017754958985],[-0.73002011405231926,-6.7822017754958992],[-0.43002011405231944,-6.7822017754958992],[-0.43002011405231944,-6.4822017754958985]],[[-7.8278379817152297,-9.2322016520028001],[-8.0399700160711891,-9.0200696176468007],[-8.2521020504271601,-9.2322016520028001],[-8.0399700160711998,-9.4443336863587],[-7.8278379817152297,-9.2322016520028001]],[[-10.230018122698469,-6.4822017754958985],[-10.530018122698468,-6.4822017754958985],[-10.530018122698468,-6.7822017754958992],[-10.230018122698469,-6.7822017754958992],[-10.230018122698469,-6.4822017754958985]],[[-6.4300198290674695,-10.2822214314305],[-6.7300198290674693,-10.2822214314305],[-6.7300198290674693,-10.582221431430501],[-6.4300198290674695,-10.582221431430501],[-6.4300198290674695,-10.2822214314305]]],[[[-0.43002011405222973,-10.2822214314305],[-0.43002011405222973,-10.427219595863601],[-0.43002011405222973,-10.427219595863601],[-0.43002011405222973,-10.2822214314305],[-0.43002011405222973,-10.2822214314305]]],[[[-0.43002011405222973,-10.427219595863601],[0.83510707489636005,-10.427219595863601],[0.83510707489636005,-10.427219595863601],[-0.43002011405222973,-10.427219595863601],[-0.43002011405222973,-10.427219595863601]]],[[[0.83510707489636005,-10.427219595863601],[0.83510707489636005,-4.5272171375912009],[0.83510707489636005,-4.5272171375912009],[0.83510707489636005,-10.427219595863601],[0.83510707489636005,-10.427219595863601]]],[[[0.83510707489636005,-4.5272171375912009],[0.55510678301988037,-4.5272171375912009],[0.55510678301988037,-4.5272171375912009],[0.83510707489636005,-4.5272171375912009],[0.83510707489636005,-4.5272171375912009]]],[[[0.55510678301988037,-4.5272171375912009],[0.55510678301988037,-2.7472166084602989],[0.55510678301988037,-2.7472166084602989],[0.55510678301988037,-4.5272171375912009],[0.55510678301988037,-4.5272171375912009]]],[[[0.55510678301988037,-2.7472166084602989],[-0.070001521129099409,-2.7472166084602989],[-0.070001521129099409,-2.7472166084602989],[0.55510678301988037,-2.7472166084602989],[0.55510678301988037,-2.7472166084602989]]],[[[-0.070001521129099409,-2.7472166084602989],[-0.21526289249859953,-2.7472166084602989],[-0.21526289249859953,-2.7472166084602989],[-0.070001521129099409,-2.7472166084602989],[-0.070001521129099409,-2.7472166084602989]]],[[[-0.21526289249859953,-2.7472166084602989],[-0.22301112112909927,-2.7472166084602989],[-0.22301112112909927,-2.7472166084602989],[-0.21526289249859953,-2.7472166084602989],[-0.21526289249859953,-2.7472166084602989]]],[[[-0.22301112112909927,-2.7472166084602989],[-6.49701022431766,-2.7472166084602989],[-6.49701022431766,-2.7472166084602989],[-0.22301112112909927,-2.7472166084602989],[-0.22301112112909927,-2.7472166084602989]]],[[[-6.49701022431766,-2.7472166084602989],[-6.5299710033195995,-2.7472166084602989],[-6.5299710033195995,-2.7472166084602989],[-6.49701022431766,-2.7472166084602989],[-6.49701022431766,-2.7472166084602989]]],[[[-6.5299710033195995,-2.7472166084602989],[-6.5299710033195995,-2.8322306261216994],[-6.5299710033195995,-2.8322306261216994],[-6.5299710033195995,-2.7472166084602989],[-6.5299710033195995,-2.7472166084602989]]],[[[-6.5299710033195995,-2.8322306261216994],[-6.5299710033195995,-3.1772306261216983],[-6.5299710033195995,-3.1772306261216983],[-6.5299710033195995,-2.8322306261216994],[-6.5299710033195995,-2.8322306261216994]]],[[[-6.5299710033195995,-3.1772306261216983],[-6.8523840632366095,-3.1772306261216983],[-6.8523840632366095,-3.1772306261216983],[-6.5299710033195995,-3.1772306261216983],[-6.5299710033195995,-3.1772306261216983]]],[[[-6.8523840632366095,-3.1772306261216983],[-7.1772607766081107,-3.191409674323971],[-7.1772607766081107,-3.191409674323971],[-6.8523840632366095,-3.1772306261216983],[-6.8523840632366095,-3.1772306261216983]]],[[[-7.1772607766081107,-3.191409674323971],[-7.4996654105982934,-3.2338499415315063],[-7.4996654105982934,-3.2338499415315063],[-7.1772607766081107,-3.191409674323971],[-7.1772607766081107,-3.191409674323971]]],[[[-7.4996654105982934,-3.2338499415315063],[-7.8171442183987061,-3.304228424725018],[-7.8171442183987061,-3.304228424725018],[-7.4996654105982934,-3.2338499415315063],[-7.4996654105982934,-3.2338499415315063]]],[[[-7.8171442183987061,-3.304228424725018],[-8.1272809425202723,-3.402009489610478],[-8.1272809425202723,-3.402009489610478],[-7.8171442183987061,-3.304228424725018],[-7.8171442183987061,-3.304228424725018]]],[[[-8.1272809425202723,-3.402009489610478],[-8.427715204367999,-3.5264489472073421],[-8.427715204367999,-3.5264489472073421],[-8.1272809425202723,-3.402009489610478],[-8.1272809425202723,-3.402009489610478]]],[[[-8.427715204367999,-3.5264489472073421],[-8.7161604685343921,-3.6765997176981067],[-8.7161604685343921,-3.6765997176981067],[-8.427715204367999,-3.5264489472073421],[-8.427715204367999,-3.5264489472073421]]],[[[-8.7161604685343921,-3.6765997176981067],[-8.9904214450895239,-3.8513190384328695],[-8.9904214450895239,-3.8513190384328695],[-8.7161604685343921,-3.6765997176981067],[-8.7161604685343921,-3.6765997176981067]]],[[[-8.9904214450895239,-3.8513190384328695],[-9.2484107974229453,-4.0492771612305276],[-9.2484107974229453,-4.0492771612305276],[-8.9904214450895239,-3.8513190384328695],[-8.9904214450895239,-3.8513190384328695]]],[[[-9.2484107974229453,-4.0492771612305276],[-9.4881650284779653,-4.2689674727834159],[-9.4881650284779653,-4.2689674727834159],[-9.2484107974229453,-4.0492771612305276],[-9.2484107974229453,-4.0492771612305276]]],[[[-9.4881650284779653,-4.2689674727834159],[-9.7078594244718417,-4.5087179611413717],[-9.7078594244718417,-4.5087179611413717],[-9.4881650284779653,-4.2689674727834159],[-9.4881650284779653,-4.2689674727834159]]],[[[-9.7078594244718417,-4.5087179611413717],[-9.905821942368668,-4.7667039410064369],[-9.905821942368668,-4.7667039410064369],[-9.7078594244718417,-4.5087179611413717],[-9.7078594244718417,-4.5087179611413717]]],[[[-9.905821942368668,-4.7667039410064369],[-10.080545935410704,-5.0409619409890034],[-10.080545935410704,-5.0409619409890034],[-9.905821942368668,-4.7667039410064369],[-9.905821942368668,-4.7667039410064369]]],[[[-10.080545935410704,-5.0409619409890034],[-10.230701619857003,-5.3294046471326233],[-10.230701619857003,-5.3294046471326233],[-10.080545935410704,-5.0409619409890034],[-10.080545935410704,-5.0409619409890034]]],[[[-10.230701619857003,-5.3294046471326233],[-10.355146195658687,-5.6298367889758829],[-10.355146195658687,-5.6298367889758829],[-10.230701619857003,-5.3294046471326233],[-10.230701619857003,-5.3294046471326233]]],[[[-10.355146195658687,-5.6298367889758829],[-10.452932544044781,-5.9399718472461558],[-10.452932544044781,-5.9399718472461558],[-10.355146195658687,-5.6298367889758829],[-10.355146195658687,-5.6298367889758829]]],[[[-10.452932544044781,-5.9399718472461558],[-10.523316435823251,-6.2574494560268477],[-10.523316435823251,-6.2574494560268477],[-10.452932544044781,-5.9399718472461558],[-10.452932544044781,-5.9399718472461558]]],[[[-10.523316435823251,-6.2574494560268477],[-10.565762195536575,-6.5798533669543531],[-10.565762195536575,-6.5798533669543531],[-10.523316435823251,-6.2574494560268477],[-10.523316435823251,-6.2574494560268477]]],[[[-10.565762195536575,-6.5798533669543531],[-10.57994677836329,-6.9047298387232701],[-10.57994677836329,-6.9047298387232701],[-10.565762195536575,-6.5798533669543531],[-10.565762195536575,-6.5798533669543531]]],[[[-10.57994677836329,-6.9047298387232701],[-10.565762517044963,-7.2296028344361538],[-10.565762517044963,-7.2296028344361538],[-10.57994677836329,-6.9047298387232701],[-10.57994677836329,-6.9047298387232701]]],[[[-10.565762517044963,-7.2296028344361538],[-10.523317683883288,-7.5520033504879862],[-10.523317683883288,-7.5520033504879862],[-10.565762517044963,-7.2296028344361538],[-10.565762517044963,-7.2296028344361538]]],[[[-10.523317683883288,-7.5520033504879862],[-10.452935309687511,-7.8694777242808556],[-10.452935309687511,-7.8694777242808556],[-10.523317683883288,-7.5520033504879862],[-10.523317683883288,-7.5520033504879862]]],[[[-10.452935309687511,-7.8694777242808556],[-10.355151046823305,-8.1796097841339339],[-10.355151046823305,-8.1796097841339339],[-10.452935309687511,-7.8694777242808556],[-10.452935309687511,-7.8694777242808556]]],[[[-10.355151046823305,-8.1796097841339339],[-10.230709092574816,-8.4800392378088816],[-10.230709092574816,-8.4800392378088816],[-10.355151046823305,-8.1796097841339339],[-10.355151046823305,-8.1796097841339339]]],[[[-10.230709092574816,-8.4800392378088816],[-10.080556525353987,-8.7684796357589647],[-10.080556525353987,-8.7684796357589647],[-10.230709092574816,-8.4800392378088816],[-10.230709092574816,-8.4800392378088816]]],[[[-10.080556525353987,-8.7684796357589647],[-9.905836096861961,-9.0427357723907136],[-9.905836096861961,-9.0427357723907136],[-10.080556525353987,-8.7684796357589647],[-10.080556525353987,-8.7684796357589647]]],[[[-9.905836096861961,-9.0427357723907136],[-9.7078775350586426,-9.3007203929039761],[-9.7078775350586426,-9.3007203929039761],[-9.905836096861961,-9.0427357723907136],[-9.905836096861961,-9.0427357723907136]]],[[[-9.7078775350586426,-9.3007203929039761],[-9.4881874241300075,-9.5404700785612739],[-9.4881874241300075,-9.5404700785612739],[-9.7078775350586426,-9.3007203929039761],[-9.7078775350586426,-9.3007203929039761]]],[[[-9.4881874241300075,-9.5404700785612739],[-9.2484377384727328,-9.7601601894899339],[-9.2484377384727328,-9.7601601894899339],[-9.4881874241300075,-9.5404700785612739],[-9.4881874241300075,-9.5404700785612739]]],[[[-9.2484377384727328,-9.7601601894899339],[-8.9904531179594898,-9.9581187512932772],[-8.9904531179594898,-9.9581187512932772],[-9.2484377384727328,-9.7601601894899339],[-9.2484377384727328,-9.7601601894899339]]],[[[-8.9904531179594898,-9.9581187512932772],[-8.7161969813277587,-10.132839179785332],[-8.7161969813277587,-10.132839179785332],[-8.9904531179594898,-9.9581187512932772],[-8.9904531179594898,-9.9581187512932772]]],[[[-8.7161969813277587,-10.132839179785332],[-8.4277565833776897,-10.282991747006193],[-8.4277565833776897,-10.282991747006193],[-8.7161969813277587,-10.132839179785332],[-8.7161969813277587,-10.132839179785332]]],[[[-8.4277565833776897,-10.282991747006193],[-8.1273271297027563,-10.40743370125471],[-8.1273271297027563,-10.40743370125471],[-8.4277565833776897,-10.282991747006193],[-8.4277565833776897,-10.282991747006193]]],[[[-8.1273271297027563,-10.40743370125471],[-7.8171950698496877,-10.505217964118952],[-7.8171950698496877,-10.505217964118952],[-8.1273271297027563,-10.40743370125471],[-8.1273271297027563,-10.40743370125471]]],[[[-7.8171950698496877,-10.505217964118952],[-7.4997206960568246,-10.575600338314761],[-7.4997206960568246,-10.575600338314761],[-7.8171950698496877,-10.505217964118952],[-7.8171950698496877,-10.505217964118952]]],[[[-7.4997206960568246,-10.575600338314761],[-7.1773201800049975,-10.618045171476471],[-7.1773201800049975,-10.618045171476471],[-7.4997206960568246,-10.575600338314761],[-7.4997206960568246,-10.575600338314761]]],[[[-7.1773201800049975,-10.618045171476471],[-6.8524471842921191,-10.632229432794826],[-6.8524471842921191,-10.632229432794826],[-7.1773201800049975,-10.618045171476471],[-7.1773201800049975,-10.618045171476471]]],[[[-6.8524471842921191,-10.632229432794826],[-6.2149487404503194,-10.632230577203998],[-6.2149487404503194,-10.632230577203998],[-6.8524471842921191,-10.632229432794826],[-6.8524471842921191,-10.632229432794826]]],[[[-6.2149487404503194,-10.632230577203998],[-6.2149487404503194,-11.797228385639098],[-6.2149487404503194,-11.797228385639098],[-6.2149487404503194,-10.632230577203998],[-6.2149487404503194,-10.632230577203998]]],[[[-6.2149487404503194,-11.797228385639098],[-3.7949483976304998,-11.797228385639098],[-3.7949483976304998,-11.797228385639098],[-6.2149487404503194,-11.797228385639098],[-6.2149487404503194,-11.797228385639098]]],[[[-3.7949483976304998,-11.797228385639098],[-3.7949483976304998,-10.697228440261199],[-3.7949483976304998,-10.697228440261199],[-3.7949483976304998,-11.797228385639098],[-3.7949483976304998,-11.797228385639098]]],[[[-3.7949483976304998,-10.697228440261199],[-3.7949483976304998,-10.427219595863601],[-3.7949483976304998,-10.427219595863601],[-3.7949483976304998,-10.697228440261199],[-3.7949483976304998,-10.697228440261199]]],[[[-3.7949483976304998,-10.427219595863601],[-0.73002011405222955,-10.427219595863601],[-0.73002011405222955,-10.427219595863601],[-3.7949483976304998,-10.427219595863601],[-3.7949483976304998,-10.427219595863601]]],[[[-0.73002011405222955,-10.427219595863601],[-0.73002011405222955,-10.2822214314305],[-0.73002011405222955,-10.2822214314305],[-0.73002011405222955,-10.427219595863601],[-0.73002011405222955,-10.427219595863601]]],[[[-0.73002011405222955,-10.2822214314305],[-0.43002011405222973,-10.2822214314305],[-0.43002011405222973,-10.2822214314305],[-0.73002011405222955,-10.2822214314305],[-0.73002011405222955,-10.2822214314305]]],[[[-0.43002011405231944,-6.4822017754958985],[-0.43002011405231944,-6.7822017754958992],[-0.43002011405231944,-6.7822017754958992],[-0.43002011405231944,-6.4822017754958985],[-0.43002011405231944,-6.4822017754958985]]],[[[-0.43002011405231944,-6.7822017754958992],[-0.73002011405231926,-6.7822017754958992],[-0.73002011405231926,-6.7822017754958992],[-0.43002011405231944,-6.7822017754958992],[-0.43002011405231944,-6.7822017754958992]]],[[[-0.73002011405231926,-6.7822017754958992],[-0.73002011405231926,-6.4822017754958985],[-0.73002011405231926,-6.4822017754958985],[-0.73002011405231926,-6.7822017754958992],[-0.73002011405231926,-6.7822017754958992]]],[[[-0.73002011405231926,-6.4822017754958985],[-0.43002011405231944,-6.4822017754958985],[-0.43002011405231944,-6.4822017754958985],[-0.73002011405231926,-6.4822017754958985],[-0.73002011405231926,-6.4822017754958985]]],[[[-7.8278379817152297,-9.2322016520028001],[-8.0399700160711998,-9.4443336863587],[-8.0399700160711998,-9.4443336863587],[-7.8278379817152297,-9.2322016520028001],[-7.8278379817152297,-9.2322016520028001]]],[[[-8.0399700160711998,-9.4443336863587],[-8.2521020504271601,-9.2322016520028001],[-8.2521020504271601,-9.2322016520028001],[-8.0399700160711998,-9.4443336863587],[-8.0399700160711998,-9.4443336863587]]],[[[-8.2521020504271601,-9.2322016520028001],[-8.0399700160711891,-9.0200696176468007],[-8.0399700160711891,-9.0200696176468007],[-8.2521020504271601,-9.2322016520028001],[-8.2521020504271601,-9.2322016520028001]]],[[[-8.0399700160711891,-9.0200696176468007],[-7.8278379817152297,-9.2322016520028001],[-7.8278379817152297,-9.2322016520028001],[-8.0399700160711891,-9.0200696176468007],[-8.0399700160711891,-9.0200696176468007]]],[[[-10.230018122698469,-6.4822017754958985],[-10.230018122698469,-6.7822017754958992],[-10.230018122698469,-6.7822017754958992],[-10.230018122698469,-6.4822017754958985],[-10.230018122698469,-6.4822017754958985]]],[[[-10.230018122698469,-6.7822017754958992],[-10.530018122698468,-6.7822017754958992],[-10.530018122698468,-6.7822017754958992],[-10.230018122698469,-6.7822017754958992],[-10.230018122698469,-6.7822017754958992]]],[[[-10.530018122698468,-6.7822017754958992],[-10.530018122698468,-6.4822017754958985],[-10.530018122698468,-6.4822017754958985],[-10.530018122698468,-6.7822017754958992],[-10.530018122698468,-6.7822017754958992]]],[[[-10.530018122698468,-6.4822017754958985],[-10.230018122698469,-6.4822017754958985],[-10.230018122698469,-6.4822017754958985],[-10.530018122698468,-6.4822017754958985],[-10.530018122698468,-6.4822017754958985]]],[[[-6.4300198290674695,-10.2822214314305],[-6.4300198290674695,-10.582221431430501],[-6.4300198290674695,-10.582221431430501],[-6.4300198290674695,-10.2822214314305],[-6.4300198290674695,-10.2822214314305]]],[[[-6.4300198290674695,-10.582221431430501],[-6.7300198290674693,-10.582221431430501],[-6.7300198290674693,-10.582221431430501],[-6.4300198290674695,-10.582221431430501],[-6.4300198290674695,-10.582221431430501]]],[[[-6.7300198290674693,-10.582221431430501],[-6.7300198290674693,-10.2822214314305],[-6.7300198290674693,-10.2822214314305],[-6.7300198290674693,-10.582221431430501],[-6.7300198290674693,-10.582221431430501]]],[[[-6.7300198290674693,-10.2822214314305],[-6.4300198290674695,-10.2822214314305],[-6.4300198290674695,-10.2822214314305],[-6.7300198290674693,-10.2822214314305],[-6.7300198290674693,-10.2822214314305]]],[[[-0.43002011405222973,-10.2822214314305],[-0.43002011405222973,-10.427219595863601],[0.83510707489636005,-10.427219595863601],[0.83510707489636005,-4.5272171375912009],[0.55510678301988037,-4.5272171375912009],[0.55510678301988037,-2.7472166084602989],[-0.070001521129099409,-2.7472166084602989],[-0.21526289249859953,-2.7472166084602989],[-0.22301112112909927,-2.7472166084602989],[-6.49701022431766,-2.7472166084602989],[-6.5299710033195995,-2.7472166084602989],[-6.5299710033195995,-2.8322306261216994],[-6.5299710033195995,-3.1772306261216983],[-6.8523840632366095,-3.1772306261216983],[-7.1772607766081107,-3.191409674323971],[-7.4996654105982934,-3.2338499415315063],[-7.8171442183987061,-3.304228424725018],[-8.1272809425202723,-3.402009489610478],[-8.427715204367999,-3.5264489472073421],[-8.7161604685343921,-3.6765997176981067],[-8.9904214450895239,-3.8513190384328695],[-9.2484107974229453,-4.0492771612305276],[-9.4881650284779653,-4.2689674727834159],[-9.7078594244718417,-4.5087179611413717],[-9.905821942368668,-4.7667039410064369],[-10.080545935410704,-5.0409619409890034],[-10.230701619857003,-5.3294046471326233],[-10.355146195658687,-5.6298367889758829],[-10.452932544044781,-5.9399718472461558],[-10.523316435823251,-6.2574494560268477],[-10.565762195536575,-6.5798533669543531],[-10.57994677836329,-6.9047298387232701],[-10.565762517044963,-7.2296028344361538],[-10.523317683883288,-7.5520033504879862],[-10.452935309687511,-7.8694777242808556],[-10.355151046823305,-8.1796097841339339],[-10.230709092574816,-8.4800392378088816],[-10.080556525353987,-8.7684796357589647],[-9.905836096861961,-9.0427357723907136],[-9.7078775350586426,-9.3007203929039761],[-9.4881874241300075,-9.5404700785612739],[-9.2484377384727328,-9.7601601894899339],[-8.9904531179594898,-9.9581187512932772],[-8.7161969813277587,-10.132839179785332],[-8.4277565833776897,-10.282991747006193],[-8.1273271297027563,-10.40743370125471],[-7.8171950698496877,-10.505217964118952],[-7.4997206960568246,-10.575600338314761],[-7.1773201800049975,-10.618045171476471],[-6.8524471842921191,-10.632229432794826],[-6.2149487404503194,-10.632230577203998],[-6.2149487404503194,-11.797228385639098],[-3.7949483976304998,-11.797228385639098],[-3.7949483976304998,-10.697228440261199],[-3.7949483976304998,-10.427219595863601],[-0.73002011405222955,-10.427219595863601],[-0.73002011405222955,-10.2822214314305],[-0.43002011405222973,-10.2822214314305]],[[-0.43002011405231944,-6.4822017754958985],[-0.43002011405231944,-6.7822017754958992],[-0.73002011405231926,-6.7822017754958992],[-0.73002011405231926,-6.4822017754958985],[-0.43002011405231944,-6.4822017754958985]],[[-7.8278379817152297,-9.2322016520028001],[-8.0399700160711998,-9.4443336863587],[-8.2521020504271601,-9.2322016520028001],[-8.0399700160711891,-9.0200696176468007],[-7.8278379817152297,-9.2322016520028001]],[[-10.230018122698469,-6.4822017754958985],[-10.230018122698469,-6.7822017754958992],[-10.530018122698468,-6.7822017754958992],[-10.530018122698468,-6.4822017754958985],[-10.230018122698469,-6.4822017754958985]],[[-6.4300198290674695,-10.2822214314305],[-6.4300198290674695,-10.582221431430501],[-6.7300198290674693,-10.582221431430501],[-6.7300198290674693,-10.2822214314305],[-6.4300198290674695,-10.2822214314305]]]]}};
L.geoJson(demo, {
style: function (feature) {
return feature.properties && feature.properties.style;
},
onEachFeature: onEachFeature,
pointToLayer: function (feature, latlng) {
return L.circleMarker(latlng, {
radius: 8,
fillColor: "#ff7800",
color: "#000",
weight: 1,
opacity: 1,
fillOpacity: 0.8
});
}
}).addTo(map);
</script>
</body>
</html>
&#13;
你能帮助我吗?
我不知道该帖子要添加什么以允许stackoverflow发布此帖子lol