File tree Expand file tree Collapse file tree 5 files changed +23
-16
lines changed Expand file tree Collapse file tree 5 files changed +23
-16
lines changed Original file line number Diff line number Diff line change @@ -79,10 +79,10 @@ return array(
7979
8080
8181
82- 1. ` mapbox.outdoors` (default mapbox theme)
83- 2. ` mapbox.streets`
84- 3. ` mapbox.light`
85- 4. ` mapbox.dark`
82+ 1. ~~ mapbox.outdoors~~ → `mapbox/outdoors-v11 ` (default mapbox theme)
83+ 2. ~~ mapbox.streets~~ → `mapbox/streets-v11 `
84+ 3. ~~ mapbox.light~~ → `mapbox/light-v10 `
85+ 4. ~~ mapbox.dark~~ → `mapbox/dark-v10 `
8686
8787In case your usage doesn't fall into the above policies (or if you don't want to rely on those services), you can set-up the field to use Mapbox' tiles.
8888
@@ -92,7 +92,7 @@ You will have to set both the `id` of the tiles you want to use and your mapbox
9292
9393` ` ` php
9494return array(
95- 'sylvainjule.locator.mapbox.id' => 'mapbox. outdoors',
95+ 'sylvainjule.locator.mapbox.id' => 'mapbox/ outdoors-v11 ',
9696 'sylvainjule.locator.mapbox.token' => 'pk.vdf561vf8...',
9797);
9898` ` `
Original file line number Diff line number Diff line change 5555 return kirby ()->url ('media ' ) . '/plugins/sylvainjule/locator/images/marker-icon- ' . $ tint .'.png ' ;
5656 },
5757 'mapbox ' => function () {
58+ $ idSwap = [
59+ 'mapbox.outdoors ' => 'mapbox/outdoors-v11 ' ,
60+ 'mapbox.streets ' => 'mapbox/streets-v11 ' ,
61+ 'mapbox.light ' => 'mapbox/light-v10 ' ,
62+ 'mapbox.dark ' => 'mapbox/dark-v10 ' ,
63+ ];
64+
65+ $ setId = option ('sylvainjule.locator.mapbox.id ' );
66+ $ id = array_key_exists ($ setId , $ idSwap ) ? $ idSwap [$ setId ] : $ setId ;
67+
5868 return array (
59- 'id ' => option ( ' sylvainjule.locator.mapbox.id ' ) ,
69+ 'id ' => $ id ,
6070 'token ' => option ('sylvainjule.locator.mapbox.token ' , '' ),
6171 );
6272 }
Original file line number Diff line number Diff line change 1818 " not ie <= 11"
1919 ],
2020 "devDependencies" : {
21- "@vue/component-compiler-utils" : " ^3.0 .0" ,
21+ "@vue/component-compiler-utils" : " ^3.2 .0" ,
2222 "cssnano" : " ^4.1.10" ,
23- "leaflet" : " ^1.5 .1" ,
24- "sass" : " ^1.21 .0" ,
25- "vue-template-compiler" : " ^2.6.11 "
23+ "leaflet" : " ^1.7 .1" ,
24+ "sass" : " ^1.29 .0" ,
25+ "vue-template-compiler" : " ^2.6.12 "
2626 },
2727 "dependencies" : {
28- "vue" : " ^2.6.11 " ,
28+ "vue" : " ^2.6.12 " ,
2929 "vue-hot-reload-api" : " ^2.3.4"
3030 }
3131}
Original file line number Diff line number Diff line change @@ -123,10 +123,7 @@ export default {
123123 return this .valueExists ? [this .value .lat , this .value .lon ] : []
124124 },
125125 tileUrl () {
126- if (this .tiles == ' mapbox' ) {
127- return ' https://api.tiles.mapbox.com/v4/' + this .mapbox .id + ' /{z}/{x}/{y}' + (L .Browser .retina ? ' @2x.png' : ' .png' ) + ' ?access_token=' + this .mapbox .token
128- }
129- else if (this .tiles == ' mapbox.custom' ) {
126+ if (this .tiles == ' mapbox' || this .tiles == ' mapbox.custom' ) {
130127 return ' https://api.mapbox.com/styles/v1/' + this .mapbox .id + ' /tiles/256/{z}/{x}/{y}' + (L .Browser .retina ? ' @2x' : ' ' ) + ' ?access_token=' + this .mapbox .token
131128 }
132129 else if (this .tiles == ' wikimedia' ) {
You can’t perform that action at this time.
0 commit comments