This is my first time using MapBox and I'm trying to import a map from TileMill.
The map has 11 layers, in TileMill, but when I import it directly to MapBox, it only seems to have a single layer.
It still shows all of the layers, but if I run the following, it returns a single layer, which seems to have all of the data on:
mapbox.auto('map', 'MAP_NAME', function(map){
console.log(map.getLayers());
});
For the map functionality, I need to be able to switch the layers on/off via user interaction, so having everything in a single layer is a slight issue.
Am I doing something wrong? I really hope that I don't have to export each of my TileMill layers individually, as this will take so much time..
Any help/advice would be much appreciated.
EDIT
After hours of searching, I've found this question on the MapBox support pages: http://support.mapbox.com/discussions/tilemill/2122-creating-a-batch-of-layers
It looks like TileMill is unable to export the layers and keep them as separate layers. Instead I will probably have to export each layer individually, which is a bit of a pain, but oh well.
If anyone has any better suggestion, please let me know :)