Lines Matching refs:ol

68  * @return {ol.Map} the created map
94 let extent = ol.extent.createEmpty();
95 let overlayGroup = new ol.layer.Group({title: 'Overlays', fold: 'open', layers: []});
96 const baseLyrGroup = new ol.layer.Group({'title': 'Base maps', layers: []});
98 const map = new ol.Map({
101 view: new ol.View({
102 center: ol.proj.transform([mapOpts.lon, mapOpts.lat], 'EPSG:4326', 'EPSG:3857'),
107 new ol.control.Attribution({
116 new ol.layer.Tile({
120 source: new ol.source.OSM()
124 new ol.layer.Tile({
128 source: new ol.source.OSM({
138 new ol.layer.Tile({
142 source: new ol.source.OSM({
151 new ol.layer.Tile({
155 source: new ol.source.OSM({
164 new ol.layer.Tile({
168 source: new ol.source.OSM({
177 new ol.layer.Tile({
181 source: new ol.source.OSM({
192 new ol.layer.Tile({
196 source: new ol.source.BingMaps({
203 new ol.layer.Tile({
207 source: new ol.source.BingMaps({
214 new ol.layer.Tile({
218 source: new ol.source.BingMaps({
227 new ol.layer.Tile({
232 source: new ol.source.StadiaMaps({
241 new ol.layer.Tile({
246 source: new ol.source.StadiaMaps({
255 extent = ol.extent.extend(extent, map.getView().calculateExtent());
258 const vectorSource = new ol.source.Vector();
260 const f = new ol.Feature({
261 geometry: new ol.geom.Point(ol.proj.fromLonLat([p.lon, p.lat])),
275 const vectorLayer = new ol.layer.Vector({
285 return new ol.style.Style({
286 image: new ol.style.Icon({
295 text: new ol.style.Text({
302 fill: new ol.style.Fill({color: 'rgb(0,0,0)'}),
304 stroke: new ol.style.Stroke({color: 'rgba(255,255,255,.4)', width: 5}),
311 extent = ol.extent.extend(extent, vectorSource.getExtent());
316 map.addControl(new ol.control.Zoom());
317 map.addControl(new ol.control.ScaleLine({bar: true, text: true}));
318 map.addControl(new ol.control.MousePosition({
319 coordinateFormat: ol.coordinate.createStringXY(4), projection: 'EPSG:4326',
321 map.addControl(new ol.control.FullScreen({
326 map.addControl(new ol.control.OverviewMap({
328 layers: [new ol.layer.Tile({
329 source: new ol.source.OSM()
332 map.addControl(new ol.control.LayerSwitcher({
341 const kmlSource = new ol.source.Vector({
343 format: new ol.format.KML(),
345 overlayGroup.getLayers().push(new ol.layer.Vector({title: 'KML file', visible: true, source: kmlSource}));
349 extent = ol.extent.extend(extent, kmlSource.getExtent());
362 'Point': new ol.style.Style({
363 image: new ol.style.Circle({
364 fill: new ol.style.Fill({
368 stroke: new ol.style.Stroke({
374 'LineString': new ol.style.Style({
375 stroke: new ol.style.Stroke({
380 'MultiLineString': new ol.style.Style({
381 stroke: new ol.style.Stroke({
386 'Polygon': new ol.style.Style({
387 stroke: new ol.style.Stroke({
391 fill: new ol.style.Fill({
395 'MultiPolygon': new ol.style.Style({
396 stroke: new ol.style.Stroke({
400 fill: new ol.style.Fill({
405 const geoJsonSource = new ol.source.Vector({
407 format: new ol.format.GeoJSON(),
409 overlayGroup.getLayers().push(new ol.layer.Vector({
418 extent = ol.extent.extend(extent, geoJsonSource.getExtent());
431 'Point': new ol.style.Style({
432 image: new ol.style.Circle({
433 fill: new ol.style.Fill({
437 stroke: new ol.style.Stroke({
443 'LineString': new ol.style.Style({
444 stroke: new ol.style.Stroke({
449 'MultiLineString': new ol.style.Style({
450 stroke: new ol.style.Stroke({
456 const gpxSource = new ol.source.Vector({
458 format: new ol.format.GPX(),
460 overlayGroup.getLayers().push(new ol.layer.Vector({
469 extent = ol.extent.extend(extent, gpxSource.getExtent());
482 const overlay = new ol.Overlay({
551 ol.coordinate.format([selFeature.get('lon'), selFeature.get('lat')], '{x}º; {y}º', 4)
592 targetGroup.getLayers().push(new ol.layer.Tile({
596 source: new ol.source.OSM({
605 targetGroup.getLayers().push(new ol.layer.Image({
609 source: new ol.source.ImageWMS({
625 const parser = new ol.format.WMTSCapabilities();
630 const options = ol.source.WMTS.optionsFromCapabilities(wmtsCap, {
636 targetGroup.getLayers().push(new ol.layer.Tile({
640 source: new ol.source.WMTS(options),
646 targetGroup.getLayers().push(new ol.layer.Image({
650 source: new ol.source.ImageArcGISRest({