mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-09-05 01:42:54 +00:00
temporary fix for #129
This commit is contained in:
@@ -50,6 +50,20 @@
|
||||
language = 'en';
|
||||
}
|
||||
|
||||
const loadJson = mapboxgl.Style.prototype._load;
|
||||
mapboxgl.Style.prototype._load = function (json, validate) {
|
||||
if (
|
||||
json['sources'] &&
|
||||
json['sources']['mapbox-satellite'] &&
|
||||
json['sources']['mapbox-satellite']['data'] &&
|
||||
json['sources']['mapbox-satellite']['data']['data']
|
||||
) {
|
||||
// Temporary fix for https://github.com/gpxstudio/gpx.studio/issues/129
|
||||
delete json['sources']['mapbox-satellite']['data']['data'];
|
||||
}
|
||||
loadJson.call(this, json, validate);
|
||||
};
|
||||
|
||||
let newMap = new mapboxgl.Map({
|
||||
container: 'map',
|
||||
style: {
|
||||
|
@@ -130,7 +130,9 @@
|
||||
});
|
||||
currentBasemap.subscribe((value) => {
|
||||
// Updates coming from the database, or from the user swapping basemaps
|
||||
selectedBasemap.set(value);
|
||||
if (value !== get(selectedBasemap)) {
|
||||
selectedBasemap.set(value);
|
||||
}
|
||||
});
|
||||
|
||||
let open = false;
|
||||
|
Reference in New Issue
Block a user