Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let scaleIcons = mapConfigCopy.hasOwnProperty('scaleIcons') ? mapConfigCopy.scaleIcons : 1
stylingOptions.scaleIcons = scaleIcons
this.map_.set('scaleIcons', scaleIcons)
this.map_.set('styling', new Styling(stylingOptions))
// //////////////////////////////////////////////////////////////////////////////////////// //
// Projections //
// //////////////////////////////////////////////////////////////////////////////////////// //
let additionalProjectionsConf = mapConfigCopy.hasOwnProperty('additionalProjections')
? mapConfigCopy.additionalProjections
: []
for (let i = 0, ii = additionalProjectionsConf.length; i < ii; i++) {
proj4.defs(additionalProjectionsConf[i].code, additionalProjectionsConf[i].definition)
}
if (additionalProjectionsConf.length > 0) {
register(proj4)
}
let mapProjection
if (!mapConfigCopy.hasOwnProperty('mapProjection')) {
Debug.warn('map should have set a `mapProjection`. Assuming default `EPSG:3857`.')
mapProjection = getProj('EPSG:3857')
} else {
mapProjection = getProj(mapConfigCopy.mapProjection)
}
this.map_.set('mapProjection', mapProjection)
let interfaceProjection = mapConfigCopy.hasOwnProperty('interfaceProjection')