Skip to content

Commit

Permalink
Merge pull request #412 from openaddresses/use-newer-protomaps-style-2
Browse files Browse the repository at this point in the history
Missed a couple spots that need the new map style
  • Loading branch information
iandees authored Nov 20, 2024
2 parents 05647ab + 8cc0505 commit b9af04c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 67 deletions.
31 changes: 1 addition & 30 deletions api/web/src/components/job/JobMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,44 +36,15 @@ export default {
container: this.$refs.map,
hash: "map",
zoom: 1,
attributionControl: false,
bounds: [
bounds[0][0][0],
bounds[0][0][1],
bounds[0][2][0],
bounds[0][2][1]
],
style: {
version: 8,
sources: {
basemap: {
type: 'raster',
tileSize: 256,
tiles: [
`https://api.mapbox.com/styles/v1/ingalls/ckvh0wwm8g2cw15r05ozt0ybr/tiles/256/{z}/{x}/{y}@2x?access_token=${res.token}`
]
}
},
layers: [{
id: 'background',
type: 'background',
paint: {
'background-color': 'rgb(4,7,14)'
}
},{
id: 'basemap',
type: 'raster',
source: 'basemap',
minzoom: 0,
maxzoom: 15
}]
}
style: 'https://api.protomaps.com/styles/v4/grayscale/en.json?key=' + res.protomaps_key,
});
tmpmap.addControl(new mapgl.AttributionControl({
customAttribution: '© <a href="https://www.mapbox.com/about/maps/" target="_blank">Mapbox</a> | © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap</a> Contributors'
}));
tmpmap.addControl(new mapgl.NavigationControl(), 'bottom-right');
tmpmap.once('load', () => {
Expand Down
38 changes: 1 addition & 37 deletions api/web/src/components/util/Coverage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,50 +112,14 @@ export default {
const opts = {
container: this.$refs.map,
hash: "map",
attributionControl: false,
style: {
version: 8,
sources: {
basemap: {
type: 'raster',
tileSize: 256,
tiles: [
`https://api.mapbox.com/styles/v1/ingalls/ckvh0wwm8g2cw15r05ozt0ybr/tiles/256/{z}/{x}/{y}@2x?access_token=${res.token}`
]
},
coverage: {
type: 'vector',
tiles: [
String(window.stdurl('/api')) + '/map/{z}/{x}/{y}.mvt'
],
minzoom: 0,
maxzoom: 6
},
},
layers: [{
id: 'background',
type: 'background',
paint: {
'background-color': 'rgb(4,7,14)'
}
},{
id: 'basemap',
type: 'raster',
source: 'basemap',
minzoom: 0,
maxzoom: 15
}]
}
style: 'https://api.protomaps.com/styles/v4/grayscale/en.json?key=' + res.protomaps_key,
}
opts.center = [0, 0];
opts.zoom = 0;
const tmpmap = new mapgl.Map(opts);
tmpmap.addControl(new mapgl.AttributionControl({
customAttribution: '© <a href="https://www.mapbox.com/about/maps/" target="_blank">Mapbox</a> | © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap</a> Contributors'
}));
tmpmap.addControl(new mapgl.NavigationControl(), 'bottom-right');
tmpmap.once('idle', () => {
map = tmpmap;
Expand Down

0 comments on commit b9af04c

Please sign in to comment.