MapBox. Hide layer at custom style - gis

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?

Related

How to display custom styled vector tiles with Mapbox GL JS?

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
});

What are the layers included by default in a Mapbox map?

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)

Geoserver Multiple ImageMosaic Rasters Issue

I am attempting to develop a stack of OS Raster basemaps to be served by Geoserver as WMS.
I have set up separate image mosaic layers for the different map styles, and set appropriate Zoom Layering levels as styles for the layers. Each individual layer displays as required both in OL preview and within GIS applications.
If I combine these layers in a Layer Group however, the preview displays a blank image, although the Palette_Index values are displayed for both layers underneath the preview image.
Is it possible to accomplish what I am attempting to do in Geoserver, and serve the multiple raster layers as a single WMS?
Any assistance would be greatly appreciated.
ADD:
Geoserver version is 2.8.0
Layer Group is simply compiled of the two imagemosaic Layers. The only change I have made from the default selections is to compute the bounds and apply an SLD style to each layer with a simple MaxScaleDenominator added which works for the layers when viewed individually.
Also tried with the standard raster sld with no editing, and the issue persists

Is it possible to add a Polygon layer to a google map v3 without using fusion tables

The question is pretty descriptive.
I am working on a website that provides locations for filming.
All the data in the site is currently stored in a MySQL database including geocode data for google maps.
I need to show polygon areas for the different london boroughs that has locations.
I have all the data as kml files, idealy i would like to store this in the MySQL database.
I have had success using fusion tables to display this data, but it seems silly to me to have to have this data duplicated on google just to use a fusion map layer, can i simply use a kml layer to render this data rather than having to create a fusion table and rendering it from that?
If so, is there a resource someone could point me to for more information?
UPDATE:
Thank you for the responses so far, i thought i would update the question with a little more info .
I eventually want to have all the areas displayed at the same time on my map and then when an area is clicked on ideally it would take you to another page on the website showing locations for that specific area.
I had initially tried using KML layers but i was getting errors saying my KML was invalid.
The KML was initially stored in a field in my database table, i think probably the errors were due to me not understanding exactly how google read in the KML data.
Using polygons would be far simpler to implement as i can get this data via JSON and then render the polygons from that.
I know now its not possible to have info windows with polygons, but i would just prefer to jump directly to another website page with info for that particular area using a click handler rather than show an info window.
Alternatively as suggested showing a tool-tip with a brief description of the area and a link to the page would be better, how the tooltip itself, is it possible to render on top the map?
I am slightly worried that I will reach the layer limit for the KML.
Is it possible to have multiple polygons rendered with KML on one layer, or do i need a separate layer for each clickable area?
The Google Maps API provides a pretty straightforward method to draw polygons.
Basic Example:
var polygon = new google.maps.Polygon({
map: your_google_map_instance,
paths: array_of_latlng_points,
fillColor: "#336699",
fillOpacity: .5,
})
EDIT: For this approach, you would need to parse your KML files (sorry, must've missed that when I first read it). You can import the KML files to a KML layer
You can overlay Polygons using KmlLayer, FusionTablesLayer (as you know), or native google.maps.Polygon objects.
KmlLayer and FusionTablesLayer render them as tiles, so for lots of Polygons (if you only need click events) will be more efficient. There are limitations on the number of KmlLayers that can be displayed on the map at one time and on FusionTablesLayer (but those don't seem to be causing you problems).
There are also third party parsers available for KML (geoxml3, geoxml-v3) which will take your KML and render it as native google.maps.Polygon objects. For lots of Polygons, this will be less efficient than tile based rendering, but it does allow mouseover/mouseout, and changing the properties of the Polygons dynamically.
You could also try data layers what have lots of events so you can display tooltips, info window, status text on various mouse events.
See samples in documentation:
https://developers.google.com/maps/documentation/javascript/datalayer
If you have many polygons (where the actual value of many depends on multiple factors, can be anywhere between 100 and 1,000) the best is to use a built in layer type. The fastest are the ones rendered on server, e.g. kml layer because this doesn't create hundreds of DOM elements in browser but still exposes click events so infoboxes can be displayed for each item.
In the worst case you can implement your own rendering with an image map, obviously by using an existing library like mapnik.
https://developers.google.com/maps/documentation/javascript/maptypes#ImageMapTypes

Can I use the Google Maps API to display a custom map?

And by custom map I mean custom map tiles, as in, mapping another planet. I've looked all around but can't see to find any resources pointing how to do this on Google's or any website.
I know it's possible because I've seen it done before on a website, but unfortunately the website that has the link to THAT site is down so I can't get to it.
Have a look at the API. This might help you by loading own images as an overlay:
Image Map Types
Implementing a MapType to act as a base map type can be a time-consuming and laborious >task. The API provides a special class that implements the MapType interface for the most >common map types: map types that consist of tiles made up of single image files.
This class, the ImageMapType class, is constructed using an ImageMapTypeOptions object specification defining the following required properties:
tileSize (required) specifies the size of the tile (of type google.maps.Size). >Sizes must be rectangular though they need not be square.
getTileUrl (required) specifies the function, usually provided as an inline >function literal, to handle selection of the proper image tile based on supplied world >coordinates and zoom level.