@@ -16,11 +16,8 @@ import {sharedStyles} from '../SharedStyles.js'
1616import { GrampsjsAppStateMixin } from '../mixins/GrampsjsAppStateMixin.js'
1717
1818const defaultConfig = {
19- glStyle : 'https://www.openhistoricalmap.org/map-styles/main/main.json' ,
20- glAttribution :
21- '<a href="https://maplibre.org/" target="_blank">MapLibre</a> | <a href="https://www.openhistoricalmap.org/">OpenHistoricalMap</a> contributors' ,
22- baseStyle : 'https://tiles.openfreemap.org/styles/liberty' ,
23- baseAttribution : '<a href="https://openfreemap.org">OpenFreeMap</a>' ,
19+ mapOhmStyle : 'https://www.openhistoricalmap.org/map-styles/main/main.json' ,
20+ mapBaseStyle : 'https://tiles.openfreemap.org/styles/liberty' ,
2421}
2522
2623const { maplibregl} = window
@@ -91,7 +88,7 @@ class GrampsjsMap extends GrampsjsAppStateMixin(LitElement) {
9188 const mapel = this . shadowRoot . getElementById ( this . mapid )
9289 const config = { ...defaultConfig , ...window . grampsjsConfig }
9390 const styleUrl =
94- this . _currentStyle === 'base' ? config . baseStyle : config . glStyle
91+ this . _currentStyle === 'base' ? config . mapBaseStyle : config . mapOhmStyle
9592 this . _map = new maplibregl . Map ( {
9693 container : mapel ,
9794 style : styleUrl ,
@@ -187,7 +184,7 @@ class GrampsjsMap extends GrampsjsAppStateMixin(LitElement) {
187184 const config = { ...defaultConfig , ...window . grampsjsConfig }
188185 const { style} = e . detail
189186 this . _currentStyle = style
190- const styleUrl = style === 'base' ? config . baseStyle : config . glStyle
187+ const styleUrl = style === 'base' ? config . mapBaseStyle : config . mapOhmStyle
191188 this . _map . setStyle ( styleUrl )
192189 if ( this . _currentStyle === 'ohm' ) {
193190 this . _map . on ( 'styledata' , ( ) => {
0 commit comments