//GeoJSON数据
let geoJsonData = {
type: "FeatureCollection",
features: [{
type: "Feature",
properties: {
styleId: 0
},
geometry: {
type: "Polygon",
coordinates: [[
[114.03274634, 22.53715749],
[114.03488384, 22.5281815],
[114.0396521, 22.5281815],
[114.04460265, 22.53191387],
[114.04828072, 22.53212417],
[114.04823425, 22.53619251],
[114.0468724, 22.537242],
[114.04373764, 22.53703171],
[114.04033123, 22.53757807],
[114.03728941, 22.53665436],
[114.03701776, 22.53602545],
[114.03583821, 22.53619251],
[114.03556298, 22.53732651],
[114.03274634, 22.53715749]
]]
}
},{
type: "Feature",
properties: {
styleId: 0
},
geometry: {
type: "LineString",
coordinates: [
[114.01176458,22.53816571],
[114.02493627,22.5380812],
[114.01785179,22.53057148],
[114.03188491,22.53053021]
]
}
},{
type: "Feature",
properties: {
styleId: 0
},
geometry: {
type: "Point",
coordinates: [114.02434649,22.52948067]
}
}]
};
let geoJson = new KMap.GeoJSON({
geoJson:geoJsonData,
pointStyle : [{
width: 32,
height: 32,
images: ['./images/c.png']
}],
polylineStyle : [{
strokeWidth: 4,
strokeColor: "blue",
strokeStyle: "solid",
strokeDasharray: [10, 50, 10]
}],
polygonStyle : [{
borderStyle: 'solid',
borderWidth:2,
borderColor:"#FF3030CC",
fillColor: "#FF8C69CC"
}]
});
map.add(geoJson);