Skip to content

Commit

Permalink
hotfix for stamen maps issue
Browse files Browse the repository at this point in the history
Hotfix for resolving stamen maps issue and converting to stadia maps

Add CNAME

Update environment.js
  • Loading branch information
hmaier-fws committed Nov 5, 2023
1 parent 97c42af commit c75e9e2
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 7 deletions.
10 changes: 8 additions & 2 deletions app/pods/components/object/md-extent/spatial/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,13 @@ profilePath=profilePath
{{#leaflet-map lat=0 lng=0 zoom=2 maxZoom=18 onLoad=(action setupMap)}}
{{!-- Specify child layer components here --}}
{{#layer-group name="Terrain" baselayer=true default=true}}
{{tile-layer url="//stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png" attribution=mapAttribution}}

{{!-- tile-layer url="http://{s}.tile.stamen.com/terrain/{z}/{x}/{y}.png" attribution=mapAttribution --}}

{{!-- tile-layer url="//stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png" attribution=mapAttribution --}}

{{tile-layer url="//tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png" attribution=mapAttribution}}

{{/layer-group}}

{{#if geographicElement.length}}
Expand Down Expand Up @@ -87,4 +93,4 @@ profilePath=profilePath
</div>
{{/if}}
</div>
{{/layout/md-card}}
{{/layout/md-card}}
10 changes: 8 additions & 2 deletions app/pods/record/show/index/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,13 @@
{{#leaflet-map lat=0 lng=0 zoom=2 maxZoom=18 onLoad=(route-action "setupMap" extent.geographicExtent.0.geographicElement)}}
{{!-- Specify child layer components here --}}
{{#layer-group name="Terrain" baselayer=true default=true}}
{{tile-layer url="//stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png" attribution=mapAttribution}}

{{!-- tile-layer url="http://{s}.tile.stamen.com/terrain/{z}/{x}/{y}.png" attribution=mapAttribution --}}

{{!-- tile-layer url="//stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png" attribution=mapAttribution --}}

{{tile-layer url="//tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png" attribution=mapAttribution}}

{{/layer-group}}

{{#feature-group name="Features" default=true}}
Expand Down Expand Up @@ -145,4 +151,4 @@
{{control/md-scroll-spy scrollInit=scrollTo setScrollTo=(route-action "setScrollTo") refresh=model.profile}}
</div>
</div>
{{/with}}
{{/with}}
9 changes: 9 additions & 0 deletions lib/ember-leaflet-table/addon/components/leaflet-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,19 @@ export default Component.extend(ResizeAware, {
}],
mapAttribution: [
'<span>',
/*
'Map tiles by <a href="http://stamen.com/">Stamen Design</a>, ',
'under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. ',
'Data by <a href="http://openstreetmap.org/">OpenStreetMap</a>, ',
'under <a href="http://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>.',
*/

// Update attribution based on recommendation from
// Stadia maps (https://docs.stadiamaps.com/attribution/#maps)
'&copy; <a href="https://stadiamaps.com/" target="_blank">Stadia Maps</a>, ',
'&copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>, ',
'&copy; <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>, ',
'&copy; <a href="https://stamen.com/" target="_blank">Stamen Design</a>.',
'</span>'
].join(""),
lat: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@
{{#leaflet-draw lat=lat lng=lng zoom=zoom onLoad=(action "setup") editLayers=layers closeForm=(action "closeForm") showForm=(action "showForm")}}
{{!-- Specify child layer components here --}}
{{#layer-group name="Terrain" baselayer=true default=true}}
{{!-- {{tile-layer url="http://{s}.tile.stamen.com/terrain/{z}/{x}/{y}.png" attribution=mapAttribution}} --}}
{{tile-layer url="//stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png" attribution=mapAttribution}}

{{!-- tile-layer url="http://{s}.tile.stamen.com/terrain/{z}/{x}/{y}.png" attribution=mapAttribution --}}

{{!-- tile-layer url="//stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png" attribution=mapAttribution --}}

{{tile-layer url="//tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png" attribution=mapAttribution}}

{{/layer-group}}

{{geojson-layer geoJSON=worldOverlay stroke=false color="#555555" fillOpacity=0.1}}
Expand Down Expand Up @@ -75,4 +80,4 @@
{{feature-form model=formData}}
{{/unless}}
{{yield}}
{{/file-picker}}
{{/file-picker}}
1 change: 1 addition & 0 deletions public/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
go.mdeditor.org

0 comments on commit c75e9e2

Please sign in to comment.