MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / _prepareFeatuers

Function _prepareFeatuers

src/leaflet/core/Transform.js:131–148  ·  view source on GitHub ↗
(feature)

Source from the content-addressed store, hash-verified

129 }
130
131 function _prepareFeatuers(feature) {
132 const geometry = feature.geometry;
133 if (!(CommonUtil.isArray(geometry.coordinates))) {
134 throw "Geometry must have coordinates array: " + geometry;
135 }
136 if (!parseCoords[geometry.type.toLowerCase()]) {
137 throw "Unsupported geometry type: " + geometry.type;
138 }
139 try {
140 geometry.coordinates = parseCoords[geometry.type.toLowerCase()].apply(
141 this, [geometry.coordinates]
142 );
143 } catch (err) {
144 throw err;
145 }
146 feature.geometry = geometry;
147 return feature;
148 }
149
150 function _transformCoordinates(coordinates) {
151 //判断code 是投影坐标还是地理坐标

Callers 1

featureTransformFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected