# Issues with custom mapbox maps

**URL:** <https://community.plotly.com/t/issues-with-custom-mapbox-maps/24772>\
**Category:** Dash Python\
**Created:** [June 19, 2019, 3:48am UTC](https://community.plotly.com/t/issues-with-custom-mapbox-maps/24772 "2019-06-19T03:48:00Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![troystory89](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@troystory89](https://community.plotly.com/u/troystory89)\
**Post date:** [June 19, 2019, 3:48am UTC](https://community.plotly.com/t/issues-with-custom-mapbox-maps/24772/1 "2019-06-19T03:48:00Z")

</div>

When I make a custom style on mapbox, and try to use it with dash, I often times run into a bug where the map loads as only the background color of the map until I press home on the map, and zoom out.

For instance, it will happen if I try to customize the ‘light’ style of mapbox, and just take away the POI layer. You can try with this style as an example:

‘mapbox://styles/troystory89/cjws3qfvgejrv1cp9n8rf7blv/draft’

Has anybody had success in making custom styles? Has anyone run into this problem before?

Here is what it looks like in dash:

 ![54%20PM](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/e/e0b17456c23c69059d98b46b63cd0c9b1040e627.png)

---

<div class="post-metadata">

**Author:** ![keend](https://avatars.discourse-cdn.com/v4/letter/k/f04885/32.png) [@keend](https://community.plotly.com/u/keend)\
**Post date:** [June 19, 2019, 12:18pm UTC](https://community.plotly.com/t/issues-with-custom-mapbox-maps/24772/2 "2019-06-19T12:18:41Z")

</div>

Same here, would also like to know the reason for this and a possible fix.

---

<div class="post-metadata">

**Author:** ![masio\_gelp](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@masio\_gelp](https://community.plotly.com/u/masio_gelp)\
**Post date:** [July 16, 2019, 2:52pm UTC](https://community.plotly.com/t/issues-with-custom-mapbox-maps/24772/3 "2019-07-16T14:52:34Z")

</div>

Same problem here. The only style that works for me is from this post: [Custom Mapbox Studio style in Dash](https://community.plotly.com/t/custom-mapbox-studio-style-in-dash/10050/5)

I don’t know why.

---

<div class="post-metadata">

**Author:** ![adamkgoldfarb](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/adamkgoldfarb/32/4349_2.png) [@adamkgoldfarb](https://community.plotly.com/u/adamkgoldfarb)\
**Post date:** [July 24, 2019, 12:01am UTC](https://community.plotly.com/t/issues-with-custom-mapbox-maps/24772/4 "2019-07-24T00:01:04Z")

</div>

I have the same problem-- my map style won’t show up until I reset the view, and then it doesn’t fully load-- what’s weird is that it’s only one layer on top of the standard “light.” I tried making the style public-- perhaps that will push it to the mapbox CDN and make the tiles more readily available?

---

<div class="post-metadata">

**Author:** ![seferoezcan](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@seferoezcan](https://community.plotly.com/u/seferoezcan)\
**Post date:** [August 6, 2019, 7:40am UTC](https://community.plotly.com/t/issues-with-custom-mapbox-maps/24772/5 "2019-08-06T07:40:09Z")

</div>

Hey, any progress or solution? Im having the same problem right now! Thx

---

<div class="post-metadata">

**Author:** ![adamkgoldfarb](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/adamkgoldfarb/32/4349_2.png) [@adamkgoldfarb](https://community.plotly.com/u/adamkgoldfarb)\
**Post date:** [August 6, 2019, 7:23pm UTC](https://community.plotly.com/t/issues-with-custom-mapbox-maps/24772/6 "2019-08-06T19:23:59Z")

</div>

So my use case for the map style was leveraging a base Mapbox tileset that I adjusted with some additional geojson to choropleth a few specific areas. I then wanted to layer a quick px.scattermapbox over those polygons and didn’t want the hassle of updating the fig.layout with additional layers. Because of the issue above, I did indeed end up splitting the geojson into separate sets of polygons, giving each of them their own color, and adding them below the topmost mapbox style layer-- which was state-label-sm or something like that. This added at least 10mb of data to the eventual deliverable, which is not great.

I am left wondering whether the incompatibility between the mapbox style and the plotly library is one that will be resolved in future updates to plotly.js (or whether this has already happened based on recent mapbox integration improvements) which will filter down to plotly.py and friends.

---

<div class="post-metadata">

**Author:** ![chriddyp](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/chriddyp/32/16855_2.png) [@chriddyp](https://community.plotly.com/u/chriddyp)\
**Post date:** [August 6, 2019, 9:55pm UTC](https://community.plotly.com/t/issues-with-custom-mapbox-maps/24772/7 "2019-08-06T21:55:28Z")

</div>

I haven’t looked into the exact issues with custom mapbox account layers, but for geojson choropleth use cases, note that the latest version of dash has a new chart type called choroplethmapbox that allows you to provide geojson and color the shapes by values. Examples in the docs are getting published this evening.

---

<div class="post-metadata">

**Author:** ![chriddyp](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/chriddyp/32/16855_2.png) [@chriddyp](https://community.plotly.com/u/chriddyp)\
**Post date:** [August 7, 2019, 3:55pm UTC](https://community.plotly.com/t/issues-with-custom-mapbox-maps/24772/8 "2019-08-07T15:55:07Z")

</div>

> [@chriddyp](#):
>
> Examples in the docs are getting published this evening.

See examples of the new chart types:

- [Mapbox map layers in Python](https://plot.ly/python/mapbox-layers/)
- [Mapbox density heatmap in Python](https://plot.ly/python/mapbox-density-heatmaps/)
- [Mapbox choropleth maps in Python](https://plot.ly/python/mapbox-county-choropleth/)

---

<div class="post-metadata">

**Author:** ![seferoezcan](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@seferoezcan](https://community.plotly.com/u/seferoezcan)\
**Post date:** [August 12, 2019, 9:34am UTC](https://community.plotly.com/t/issues-with-custom-mapbox-maps/24772/9 "2019-08-12T09:34:36Z")

</div>

Hey it would be really cool, if wed get the custom layers working! Thx for everything tho, cheers

---

<div class="post-metadata">

**Author:** ![adamkgoldfarb](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/adamkgoldfarb/32/4349_2.png) [@adamkgoldfarb](https://community.plotly.com/u/adamkgoldfarb)\
**Post date:** [August 22, 2019, 4:57am UTC](https://community.plotly.com/t/issues-with-custom-mapbox-maps/24772/10 "2019-08-22T04:57:23Z")

</div>

Thanks @chriddyp, great to know these recently landed. They may indeed obviate the need for the futzing I described earlier in the thread.
