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

Method transferToMapLatLng

src/classic/overlay/MapVLayer.js:231–239  ·  view source on GitHub ↗

* @function SuperMap.Layer.MapVLayer.prototype.transferToMapLatLng * @description 将经纬度转成底图的投影坐标。 * @param {SuperMap.LonLat} latLng - 经纬度坐标。 * @deprecated

(latLng)

Source from the content-addressed store, hash-verified

229 * @deprecated
230 */
231 transferToMapLatLng(latLng) {
232 var source = 'EPSG:4326',
233 dest = 'EPSG:4326';
234 var unit = this.map.getUnits() || 'degree';
235 if (['m', 'meter'].indexOf(unit.toLowerCase()) > -1) {
236 dest = 'EPSG:3857';
237 }
238 return new SuperMap.LonLat(latLng.lon, latLng.lat).transform(source, dest);
239 }
240}
241SuperMap.Layer.MapVLayer = MapVLayer;

Callers 2

MapVLayerSpec.jsFile · 0.80
_canvasUpdateMethod · 0.80

Calls 1

indexOfMethod · 0.80

Tested by

no test coverage detected