Skip to content

Instantly share code, notes, and snippets.

@zzdoreen
zzdoreen / bmapGeojsonFun.js
Last active December 18, 2024 03:01
百度地图处理geojson数据
function displayGeoJSON(geoJsonData) {
if (!geoJsonData || !geoJsonData.features) {
console.error("无效的GeoJSON数据");
return;
}
geoJsonData.features.forEach(function (feature) {
var geometry = feature.geometry;
var coordinates = [];
var type = geometry.type;
if (type === "Point") {