Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix satellite layers for map- traces #7092

Merged
merged 6 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions draftlogs/7092_fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Fix satellite-streets with map traces [[#7092](https://github.com/plotly/plotly.js/pull/7092)]

birkskyum marked this conversation as resolved.
Show resolved Hide resolved
98 changes: 3 additions & 95 deletions src/plots/map/constants.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
'use strict';

var sortObjectKeys = require('../../lib/sort_object_keys');
var arcgisSatHybrid = require('./styles/arcgis-sat-hybrid.json');
birkskyum marked this conversation as resolved.
Show resolved Hide resolved
var arcgisSat = require('./styles/arcgis-sat.json');


var OSM = '© <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors';

Expand All @@ -10,102 +13,7 @@ var cartoVoyager = 'https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json
var cartoPositronNoLabels = 'https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json';
var cartoDarkmatterNoLabels = 'https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json';
var cartoVoyagerNoLabels = 'https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json';
var arcgisSatHybrid = 'https://raw.githubusercontent.com/go2garret/maps/v1.0.0/src/assets/json/arcgis_hybrid.json';
var arcgisSat = {
version: 8,
name: 'orto',
metadata: {},
center: [
1.537786,
41.837539
],
zoom: 12,
bearing: 0,
pitch: 0,
light: {
anchor: 'viewport',
color: 'white',
intensity: 0.4,
position: [
1.15,
45,
30
]
},
sources: {
ortoEsri: {
type: 'raster',
tiles: [
'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}'
],
tileSize: 256,
maxzoom: 18,
attribution: 'ESRI &copy; <a href=\'http://www.esri.com\'>ESRI</a>'
},
ortoInstaMaps: {
type: 'raster',
tiles: [
'https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png'
],
tileSize: 256,
maxzoom: 13
},
ortoICGC: {
type: 'raster',
tiles: [
'https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg'
],
tileSize: 256,
minzoom: 13.1,
maxzoom: 20
},
openmaptiles: {
type: 'vector',
url: 'https://geoserveis.icgc.cat/contextmaps/basemap.json'
}
},

sprite: 'https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1',
glyphs: 'https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf',
layers: [
{
id: 'background',
type: 'background',
paint: {
'background-color': '#F4F9F4'
}
},
{
id: 'ortoEsri',
type: 'raster',
source: 'ortoEsri',
maxzoom: 16,
layout: {
visibility: 'visible'
}
},
{
id: 'ortoICGC',
type: 'raster',
source: 'ortoICGC',
minzoom: 13.1,
maxzoom: 19,
layout: {
visibility: 'visible'
}
},
{
id: 'ortoInstaMaps',
type: 'raster',
source: 'ortoInstaMaps',
maxzoom: 13,
layout: {
visibility: 'visible'
}
},
],

};

var stylesMap = {
basic: cartoVoyager,
Expand Down
Loading