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

Function isFlat

libs/leaflet/leaflet-src.js:6529–6531  ·  view source on GitHub ↗
(latlngs)

Source from the content-addressed store, hash-verified

6527 // @function isFlat(latlngs: LatLng[]): Boolean
6528 // Returns true if `latlngs` is a flat array, false is nested.
6529 function isFlat(latlngs) {
6530 return !isArray(latlngs[0]) || (typeof latlngs[0][0] !== 'object' && typeof latlngs[0][0] !== 'undefined');
6531 }
6532
6533 function _flat(latlngs) {
6534 console.warn('Deprecated use of _flat, please use L.LineUtil.isFlat instead.');

Callers 5

polygonCenterFunction · 0.85
_flatFunction · 0.85
polylineCenterFunction · 0.85
leaflet-src.jsFile · 0.85
latLngsToCoordsFunction · 0.85

Calls 1

isArrayFunction · 0.50

Tested by

no test coverage detected