This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

Ivan Kataev

  • ***
  • 48 posts
Style
« on: April 08, 2022, 10:23:08 AM »
How to connect style maps with mapbox?
I saw in the reviews that this is possible.
« Last Edit: April 08, 2022, 11:06:05 AM by Ivan Kataev »

*

MB Themes

Re: Style
« Reply #1 on: April 08, 2022, 01:14:18 PM »
@Ivan
Sorry not sure what you mean
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Ivan Kataev

  • ***
  • 48 posts
Re: Style
« Reply #2 on: April 08, 2022, 03:58:16 PM »
Mapbox allows you to customize the appearance of the map.  But in the module, the view does not change.

*

MB Themes

Re: Style
« Reply #3 on: April 09, 2022, 07:17:40 AM »
Maybe you can inject your own but I was never trying that.
It may also refer to newer API versions
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Vlad7

  • ****
  • 196 posts
Re: Style
« Reply #4 on: April 13, 2022, 11:39:09 AM »
You need to create your map at https://account.mapbox.com/access-tokens/ and add it to the plugin

Marked as best answer by Ivan Kataev on May 19, 2022, 01:11:06 PM
*

Vlad7

  • ****
  • 196 posts
Re: Style
« Reply #5 on: April 13, 2022, 12:05:33 PM »
In the files home_map, item-map, publish_map, search_map, user_map, you need to find the line

L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=<?php echo osm_param('token'); ?>', {maxZoom: 18, id: 'mapbox/streets-v11', attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(osmMap);


'mapbox/streets-v11' - change it to your map

mine looks like this
 L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=<?php echo osm_param('token'); ?>', {maxZoom: 18, id: 'vliertyrtav/ckl8s5rrp1pgg45r8gc1rkaws', attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(osmMap);

*

MB Themes

Re: Style
« Reply #6 on: April 13, 2022, 08:20:51 PM »
Ok so you meant custom tiles or how is it called, map background?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Vlad7

  • ****
  • 196 posts
Re: Style
« Reply #7 on: April 14, 2022, 01:42:59 PM »
Ok so you meant custom tiles or how is it called, map background?

This is the style of the card. You can create your own map style and add it to the plugin.