I cannot find any documentation on what layers are included by default in a Mapbox map?
I know water is one, since you can place a layer you add before it (see documentation here), but what are the other "default" layers?
The layers on the map are determined by the map's style.
You can see the layers in a style by
opening the style in Mapbox Studio
using the Map#getStyle method
looking at the style JSON in the mapbox-gl-styles Github repo (only applicable to basic, bright, empty, and satellite)
Related
I am planning the development of a map service, where I'd like to display a list of markers on top of a custom "base layer" consisting in vector tiles rendered with TileServer-GL.
I understand that TileServer-GL render vector tiles based on an .mbtiles tileset and style with a .json style file made for instance with Maputnik.
When comes the step of displaying that into an interactive map, for instance with Mapbox GL JS, I understand that you can specify the tiles served by TileServer-GL as a third party source (https://docs.mapbox.com/mapbox-gl-js/example/third-party/), but it seems that you then need to add layers one by one, and specifying the style of each layer. But I thought that's what the tile server already does! Have I misunderstood anything?
Thanks for your help
I'm not exactly sure what you're asking, but basically you will:
Construct a Mapbox GL style file (.json) which refers to all the layers you have created, where they are hosted, and how you want each of them displayed.
Initialise a map object that loads that style file:
const map = new mapboxgl.Map({
// ...
style: 'http://localhost:8000/style.json
});
I have two tileset with coordinate (created from GeoJSON file):
tilest # 1. Point on map.
tilest # 2. Route on map.
Both tilesets are so big - so, I don't what to make client to download data source and filter it.
I've created custom Mapbox style and added two layers with these tilesets as data sources.
I want to show the map from style:
without these custom layers
with only first layer
with only second layer
with both layers
Is it possible to do with Mapbox Static API (https://www.mapbox.com/api-documentation/#static)? Or mapbox caches and makes rasterisation from all layers in style and separate them is not possible?
In general, what is the best strategy for huge tilesets? Should I make different style for every case and switch them on client?
I'm wondering if it's possible to add a 3D model made in Sketchup, exported o KMZ format, to a Google Map, with the Google Maps API. I was able to add KMZ layers that contained simple data as landmarks and such, but when I try to load the 3D model KMZ, the map just shows a default house file icon.
The test map can be accessed here: http://thebob.com.br/maptest/kmz_test.html
The KMZ file is hosted here: https://sites.google.com/site/dmgckmlfiles/kml-files/Bulk_carrier_1509.kmz
At this point I'm just guessing it's not possible to add 3D models like this into Google Maps (as the exact same thing happens if I import the file through My Maps), but I want to make sure of that before giving up.
Thanks in advance for any info!
Well if you are pertaining in Google JavaScript API, Yes this API does support the KMZ as you can see in this link about Supported KML elements. But the 3D object is not.
Also, according to this SO question, that 3D is not yet features in Javascript API. Closest things to this are Styled Maps. Only the Android implementations are available as of now.
But I found this tutorial that can help you if you still want 3D objects.
Is it possible to use with google api v3 something similar to this: https://earthbuilder.google.com/10446176163891957399-13737975182519107424-4/mapview/
Should I use google map engine to apply the night view overlay?
Please advice
The link no longer works, but assuming you want something like Google Maps' "night mode" (that automatically activates when navigating during night), yes, it's possible!
You need to use map styling, as described in this official documentation.
With style options you can customize the presentation of the standard Google map styles, changing the visual display of features like roads, parks, businesses, and other points of interest. This means that you can emphasize particular components of the map or make the map complement the style of your app.
(...)
To style your map, call GoogleMap.setMapStyle() passing a MapStyleOptions object that contains your style declarations in JSON format.
You can use the Maps Platform Styling Wizard as a quick way to generate a JSON styling object.
I want to add traffic information to my custom map. Currently I'm using a Tile Layer Overlay on my Google Map to display custom map tiles. When I try to add GTrafficOverlay to my map, my custom map tiles display above the traffic information. Is there any way to display the traffic above my GTileLayerOverlay?
(Using the JavaScript api)
You should be able to do this in V3. Take a look at this sample: http://code.google.com/apis/maps/documentation/v3/overlays.html#ImageMapTypes
I tried this out and wasn't able to find a solution to the problem. There is nothing in the GTrafficOverlayOptions and I couldn't find anything in the references about the z-order of this stuff. I have suspect that this isn't possible.
Would love to see an alternative answer showing that I am wrong.