BreezeMap: extra layers
Posted by gregster on 05 Oct 2017 in Academic
I've found a few good resources for map tiles.
The CRD takes aerial photos every two years and makes them available as WMS layers. Add 2015 to an OL4 map:
//CRD layerCRD = new ol.layer.Tile({ //extent: extent, source: new ol.source.TileWMS({ url: 'https://mapservices.crd.bc.ca/arcgis/services/Ortho2015/MapServer/WMSserver', //crossOrigin: 'anonymous', params: { 'LAYERS': '5', 'FORMAT': 'image/png', 'SRS': 'EPSG:3857' }, serverType: 'mapserver' }) });
The BC Government also provides aerial/satelite tiles
layerBCWMS = new ol.layer.Tile({ //extent: extent, source: new ol.source.TileWMS({ url: 'https://openmaps.gov.bc.ca/lzt/ows/', crossOrigin: 'anonymous', params: { 'LAYERS': '140', 'FORMAT': 'image/png', 'SRS': 'EPSG:3857' }, serverType: 'mapserver' }) });
and map tiles, too
layerBC = new ol.layer.Tile({ source: new ol.source.XYZ({ url: 'http://maps.gov.bc.ca/arcgis/rest/services/province/web_mercator_cache/MapServer/tile/{z}/{y}/{x}', numZoomLevels: 18, maxZoom: 17 }) });
Licensing is (as of October 2017) quite liberal.