initialize: function(accessToken, options) { L.setOptions(this, options); this.options.geocodingQueryParams.access_token = accessToken; this.options.reverseQueryParams.access_token = accessToken; },
initialize: function(options) { L.setOptions(this, options); this._formatter = this.options.formatter || new L.Routing.Formatter(this.options); this._itineraryBuilder = this.options.itineraryBuilder || new L.Routing.ItineraryBuilder({ containerClassName: this.options.itineraryClassName }); },
initialize: function(urls, options) { this._url = urls[0]; this._urls = urls; this._urlsIndex = 0; let wmsParams = L.extend({}, this.defaultWmsParams); let tileSize = options.tileSize || this.options.tileSize; if (options.detectRetina && L.Browser.retina) { wmsParams.width = wmsParams.height = tileSize * 2; } else { wmsParams.width = wmsParams.height = tileSize; } for (let i in options) { // all keys that are not TileLayer options go to WMS params if (!this.options.hasOwnProperty(i) && i !== 'crs') { wmsParams[i] = options[i]; } } this.wmsParams = wmsParams; L.setOptions(this, options); },
initialize: function (options) { L.setOptions(this, options); this.dimension = this.options.dimension; this._distances = this.options.distances; this._userLocation = this.options.userLocation; this._map = this.options.map; this._mapPane = this._map.getPanes()['mapPane']; this._numItems = 0; this._filter = { location: 'all', distance: this.options.distances[0] }; this._container = null; this._form = null; this._locationFieldset = null; this._distanceFieldset = null; this._userLocationInput = null; this._definedLocationInput = null; this._initLayout(); this._initItems(); this.update(); },
initialize: function (baseLayers, overlays, observationsDeferred, options) { var self = this; L.setOptions(this, options); this._layers = {}; this._lastZIndex = 0; this._handlingClick = false; for (var i in baseLayers) { this._addLayer(baseLayers[i], i); } for (i in overlays) { this._addLayer(overlays[i], i, 'overlay'); } observationsDeferred .done(function(observationLayers) { for (i in observationLayers) { self._addLayer(observationLayers[i], i, 'observation'); } // Redraw the UI with the new layers self._update(); }) .fail(function(reason) { $('#observations-layer-list').text(reason); }); },
initialize: function (options) { L.setOptions(this, options); // css let uniqueClassName = 'lpi-' + new Date().getTime() + '-' + Math.round(Math.random() * 100000); let before = ['background-color: ' + this.options.color]; let after = [ 'box-shadow: 0 0 6px 2px ' + this.options.color, 'animation: lmapIcon ' + this.options.heartbeat + 's ease-out', 'animation-iteration-count: infinite', 'animation-delay: ' + 0 + 's', ]; if (!this.options.animate) { after.push('animation: none'); } let css = [ '.' + uniqueClassName + '{' + before.join(';') + ';}', '.' + uniqueClassName + ':after{' + after.join(';') + ';}', ].join(''); let el = document.createElement('style'); if (el.styleSheet) { el.styleSheet.cssText = css; } else { el.appendChild(document.createTextNode(css)); } document.getElementsByTagName('head')[0].appendChild(el); // apply css class this.options.className = this.options.className + ' leaflet-lmap-icon ' + uniqueClassName; // initialize icon L.DivIcon.prototype.initialize.call(this, options); }
initialize: function (options) { VirtualGrid.prototype.initialize.call(this, options); options.url = cleanUrl(options.url); options = L.setOptions(this, options); this.service = featureLayerService(options); this.service.addEventParent(this); // use case insensitive regex to look for common fieldnames used for indexing if (this.options.fields[0] !== '*') { var oidCheck = false; for (var i = 0; i < this.options.fields.length; i++) { if (this.options.fields[i].match(/^(OBJECTID|FID|OID|ID)$/i)) { oidCheck = true; } } if (oidCheck === false) { warn('no known esriFieldTypeOID field detected in fields Array. Please add an attribute field containing unique IDs to ensure the layer can be drawn correctly.'); } } if (this.options.timeField.start && this.options.timeField.end) { this._startTimeIndex = new BinarySearchIndex(); this._endTimeIndex = new BinarySearchIndex(); } else if (this.options.timeField) { this._timeIndex = new BinarySearchIndex(); } this._cache = {}; this._currentSnapshot = []; // cache of what layers should be active this._activeRequests = 0; },
initialize: function (options) { setOptions(this, options) this._redraw = this._redraw.bind(this) this._onMouseDown = this._onMouseDown.bind(this) this._onMouseMove = this._onMouseMove.bind(this) this._onMouseClick = this._onMouseClick.bind(this) this.latLngToPoint = this.latLngToPoint.bind(this) },
initialize: function (map, feature, options) { L.setOptions(this, options); this.map = map; this.feature = feature; this.feature.editor = this; this.editLayer = new L.LayerGroup(); this.tools = this.options.editTools || map.editTools; },
initialize : function (options) { /** liste de points selectionnée */ this._currentPoints = []; /** uuid */ this._uid = ID.generate(); L.setOptions(this, options); },
setStyle: function(style) { L.setOptions(this, style); if (this.editor && this.editor._enabled) { this.editor.updateStyle(); } else { this._renderText(); } },
initialize: function (map, options) { L.setOptions(this, options); this._lastZIndex = this.options.zIndex; this.map = map; this.editLayer = this.createEditLayer(); this.featuresLayer = this.createFeaturesLayer(); this.forwardLineGuide = this.createLineGuide(); this.backwardLineGuide = this.createLineGuide(); },
initialize : function(options) { options.fillOpacity = options.opacity; delete options.opacity; var url = null; L.TileLayer.Canvas.prototype.initialize.apply(this, url, options); L.setOptions(this, options); if (this.options.data) { this.setData(this.options.data); } },
initialize: function (options) { L.setOptions(this, options); this.dimension = this.options.dimension; this._numItems = 0; this.filters = {}; this._initLayout(); this._initItems(); this.update(); },
initialize: function(route, options) { L.setOptions(this, options); L.LayerGroup.prototype.initialize.call(this, options); this._route = route; if (this.options.extendToWaypoints) { this._extendToWaypoints(); } this._addSegment( route.coordinates, this.options.styles, this.options.addWaypoints); },
initialize: function (geoJSON, options) { L.setOptions(this, options); this._map = this.options.map || {}; this._duration = this.options.duration || {}; this._geos = this._geos || []; this._makers = this._makers || []; this._chID = this._chID || 1; this._featureGroup = this._featureGroup || {}; this._setData(geoJSON); this.start = this._start || {}; this.stop = this._stop || {}; this.speedUp = this._speedUp || {}; this.speedDown = this._speedDown || {}; this.clearLayer = this._clearLayer || {}; },
initialize: function (options) { L.setOptions(this, options); this.dimension = this.options.dimension; this._map = this.options.map; this._regionsLayer = this.options.regionsLayer; this._nameProperty = this.options.nameProperty; this._numItems = 0; this._filters = {}; this._activeFilters = []; this._container = null; this._form = null; this._initLayout(); this._initItems(); this.update(); },
initialize: function (placeholder, options) { options = options || {}; options.autoPan = false; L.setOptions(this, options); // Find content container var content = L.DomUtil.get(placeholder); L.DomEvent.on(content, 'click', function (e) { L.DomEvent.stopPropagation(e); }); // Remove the content container from its original parent content.parentNode.removeChild(content); var top = L.DomUtil.create('div', 'top-menu', content); this._contentContainer = L.DomUtil.create('div', 'sidebar-content', content); this.on('hide', this._removeContent, this); var l = 'leaflet-'; // Create sidebar container var container = this._container = L.DomUtil.create('div', l + 'sidebar knreise-sidebar ' + this.options.position); // Create close button and attach it if configured if (this.options.closeButton) { var close = this._closeButton = L.DomUtil.create('a', 'close pull-right', top); close.innerHTML = '×'; } this._top = L.DomUtil.create('span', '', top); // Style and attach content container L.DomUtil.addClass(content, l + 'control'); container.appendChild(content); this.on('hide', function () { if (this._map) { this._map.fire('sidebarClosed'); } }, this); this.sidebar = new SidebarContent(this._container, this._contentContainer, this._top, this.options, this._map); },
initialize: function (layers, options) { L.setOptions(this, options); this.data = this.options.data; this.opacity = this.options.opacity; this.popupInfo = null; this.labelingInfo = null; this._layers = {}; var i, len; if (layers) { for (i = 0, len = layers.length; i < len; i++) { this.addLayer(layers[i]); } } if (typeof this.data === 'string') { this._getFeatureCollection(this.data); } else { this._parseFeatureCollection(this.data); } },
initialize: function(accessToken, options) { L.setOptions(this, options); this._accessToken = accessToken; },
initialize: function (options) { L.setOptions(this, options); this.numLoading = 0; },
params:function(options){ L.setOptions(this, options); return this; },
import clusterIcon from './ClusterIcon'; import circleMarker from '../CircleMarker'; export const ClusterMarker = L.Marker.extend({ initialize(feature, options) { this._feature = feature; this._latlng = L.GeoJSON.coordsToLatLng(feature.geometry.coordinates); options.icon = clusterIcon({ size: feature.properties.size, count: feature.properties.count, color: options.color, }); L.setOptions(this, options); }, getFeature() { return this._feature; }, getBounds() { return this._feature.properties.bounds; }, spiderify() { if (!this._spiderified) { const feature = this._feature; const options = this.options; const map = this._map;
initialize: function (options) { options = setOptions(this, options); this._zooming = false; },
// Currently not in use import L from 'leaflet'; import '../temp/leaflet.heat'; // TODO: Load as NPM module when Leaflet 1.0 is released export const Heat = L.HeatLayer.extend({ options: { radius: 25, maxZoom: 12, }, initialize(opts) { const options = L.setOptions(this, opts); L.HeatLayer.prototype.initialize.call(this, [], options); if (typeof options.data === 'string') { // URL this.loadData(options.data); } else { this.addData(options.data); } }, // Load DHIS2 data loadData(url) { fetch(url) .then(response => response.json()) .then(this.addData.bind(this)) .catch(ex => window.console.log('parsing failed', ex)); },
initialize: function (options) { L.setOptions(this, options); this.options.units = L.extend({}, units, this.options.units); this._symbols = new Symbology(_.pick(this.options, 'activeColor', 'completedColor')); i18n.setLocale(this.options.localization); },
initialize : function(options) { L.setOptions(this, options); // this._move = _.throttle(this._move, 20); // this._update = _.debounce(this._update, 10); },
initialize: function(options) { L.setOptions(this, options); },
setOptions: function (options) { setOptions(this, options) return this.scheduleRedraw() },
initialize: function(key, options) { this._key = key; L.setOptions(this, options); // Backwards compatibility this.options.serviceUrl = this.options.service_url || this.options.serviceUrl; },