-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SpriteAtlas out of space #2164
Comments
This is such an awesome map! I love seeing people push the boundaries of what they can do with Mapbox GL.. I don't have anything to add other than that we do plan to improve the resource management of the glyph/sprite atlases so that they can resize larger if needed, and so that the atlas textures only contain what is needed to render the visible portion of the map. We can leave this issue open and revisit it in a few months.. |
I've downloaded a copy of mapboxgl.js so that I could make SpriteAtlas bigger. Here's an example of it working: http://art-maps.herokuapp.com/map/view/56e4cbd0d08d821100da1f2a#3.09/27.71/-84.70 The one landuse that I can't get to work is "sand". On the outdoors JSON, there's a straightforward definition of it: https://github.com/mapbox/mapbox-gl-styles/blob/master/styles/outdoors-v7.json#L400-L413 On my own map it's very similar (https://github.com/mapmeld/texture-maps/blob/master/static/sample-map.js#L120-L127) but using fill-pattern. I can't get it to show up on my map, so the Sahara looks super-empty. I tried switching to fill-color and it wasn't coming through |
Please read the documentation for the data source you are using. https://www.mapbox.com/developers/vector-tiles/mapbox-terrain/#landcover |
Thanks! I'm set for now, then. |
Has any progress been made on this? Currently trying to squeeze 338 icons onto the sprite but it keeps throwing the error. Resizing the SVGs doesn't seem to do much either. |
@Politify for my project I made my own copy of mapboxgl.js and changed the one part where it generates the SpriteAtlas to |
@mapmeld Thank you! You still hosted the sprites with Mapbox, right? |
I host the sprite and specs myself.
new mapboxgl.Map({
container: 'map',
center: [-73.26, 42.786],
zoom: 6,
style: {
"version": 8,
"sprite": spriteID, and spriteID is a variable, in this case the string "/halfsprite" that directs MapBoxGL to pull in /halfsprite.json for the coordinates, and /halfsprite.png, and (mandatory) retina version /[email protected] - they all share the same name |
In August 2014, I used MapBoxGL to make a Van Gogh texture map: http://mapmeld.github.io/van-gogh-map/#6/42.786/-73.260 which got some positive press: http://thecreatorsproject.vice.com/blog/explore-a-van-gogh-styled-google-maps-remix
I'm updating the map for current MapBoxGL and hopefully making it customizable for people to select other artworks and extract textures from their own images. I got two of the textures loading and then "SpriteAtlas out of space" warning (related to #1897). It is a large sprite.png file, so I shrunk it 50% and got more of the textures to load, but still issues: http://art-maps.herokuapp.com/create It actually depends where you first load the map, so if you open in Antarctica you'll see snow and water but no other textures loaded, and if you open in a forest area you'll get forest textures prioritized first.
I don't want to make sprite.png smaller and smaller, so: Is there a target limit? Can I make SpriteAtlas bigger? Is this a bad idea?
Thanks! -- Nick
The text was updated successfully, but these errors were encountered: