-
Notifications
You must be signed in to change notification settings - Fork 6
Map Services
Julian Higman edited this page Jan 25, 2021
·
4 revisions
We're using Leaflet for maps, which can be configured with various services:
var center = [54.9, -4.5];
var api_key = gon.global.OSDATAHUB_API_KEY;
var serviceUrl = 'https://api.os.uk/maps/raster/v1/zxy/Light_3857/{z}/{x}/{y}.png?key=' + api_key;
var attribution = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>';
var subdomains = '';
var serviceUrl = 'http://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}&language=en-GB';
var attribution = '© <a href="https://www.google.com">Google Maps</a> © 2021</a>';
var subdomains = ['mt0','mt1','mt2','mt3'];
var api_key = gon.global.MAPBOX_API_KEY;
var serviceUrl = 'https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/{z}/{x}/{y}?access_token=' + api_key;
// var serviceUrl = 'https://api.mapbox.com/styles/v1/mapbox/light-v10/tiles/{z}/{x}/{y}?access_token=' + api_key;
var attribution = '© <a href="https://www.mapbox.com/feedback/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>';
var subdomains = '';
var serviceUrl = 'https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png';
var attribution = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>';
var subdomains = 'abcd';
var serviceUrl = 'https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png';
var attribution = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>';
var subdomains = 'abcd';
var serviceUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
var attribution = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors';
var subdomains = '';
var serviceUrl = 'https://tiles.stadiamaps.com/tiles/alidade_smooth/{z}/{x}/{y}{r}.png';