MCPcopy Index your code
hub / github.com/Maps4HTML/MapML.js / _coordsToArray

Method _coordsToArray

src/map-area.js:145–155  ·  view source on GitHub ↗
(containerPoints)

Source from the content-addressed store, hash-verified

143 delete this._feature;
144 }
145 _coordsToArray(containerPoints) {
146 // returns an array of arrays of coordinate pairs _coordsToArray("1,2,3,4") -> [[1,2],[3,4]]
147 for (
148 var i = 1, points = [], coords = containerPoints.split(',');
149 i < coords.length;
150 i += 2
151 ) {
152 points.push([parseInt(coords[i - 1]), parseInt(coords[i])]);
153 }
154 return points;
155 }
156 _pointsToLatLngs(points) {
157 // points should be an array of nested container coordinates [[x1,y1],[x2,y2](,[xN,yN])]
158 var latLngArray = [];

Callers 2

_attachedToMapMethod · 0.95
util.spec.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected