Add multiple tilesets of same area to same style in mapbox - javascript

I am working on a project to show variation in NDVI values of a district in India on a fortnightly basis on Mapbox. For that I need to overlay a layer of tileset showing NDVI values of that district upon a map of India. The problem is that I have to do it for a couple of tilesets (Around 50) of the same district. One way is to use different styles for different tilesets. But it is limited to 20 styles for a free account. Other way is to use same style and overlay the different layers of 'NDVI maps' one upon other. But in that case I'm only able to see the topmost layer. Rest of the layers of same district are not visible. I see that there are two possible solutions.
Find a method to put/show a particular layer on top at a time. Rest of the layers would be below the current layer, hence would not be visible.
Find a method to automate the addition of a tileset to a style and reset the style (means delete or hide the previous added layer) and add a new layer and show it.
Please help. If the question is not clear, please inform.

Related

Persistent layers after style change in Mapbox gl js

Is it possible to change map style from Streetview to satellite retaining all manually drawn layers (geojson shapes)?
e.g.
Let's say we have a circle on Streetview map and want to show the same circle in street view mode. After we change map style to satellite we have to add the circle again. Is there any possibility to avoid that?
I want to find the possibility do not process something that was processed already again, to exclude listening for style changes and adding layers again.
Is any multi styles map instances supported by mapbox?
Or the possibility to render the whole style as a background or might be even having Streetview as a layer in my main style to achieve that?
Check out https://github.com/mapbox/mapbox-gl-js/issues/4006 for a few ideas of how this could be made easier along with some workarounds.

level picker in JavaScript API v3 for indoor maps

I'm doing an offline mapping of my school building. One of the buildings have 9 floors. Just started to test and put two ground Overlays that way:
layer1 = new google.maps.GroundOverlay('images/2floor.svg', layerBounds);
layer2 = new google.maps.GroundOverlay('images/1floor.svg', layerBounds);
In other words, I've placed the two layers in the same spot.
I believed that when I increase zoom in the area, the floor picker would be shown, but that doesn't happen.
I appreciate any help with this.
The V3 version of javascript GroundOverlay does not support what you want to do. Google Maps will just lay the second GroundOverlay over the first, and the first will never show.
With the upcoming demise of Google Maps Engine, and because we had a need to show different imagery at different zoom levels plus non-rectangular satellite imagery, we wrote a GroundOverlayEX javascript class for Google Maps API V3. It does everything the Google Earth version of GroundOverlay does (including image rotation, non-rectangular images, drawing order, support for switching images at different zoom levels, etc).
The class is up on GitHub at https://github.com/azmikemm/GroundOverlayEX
There is complete API documentation there too (documentation.txt). This is a recent coding effort.
If you want to see a working example of the class in action, you can visit
https://sites.google.com/site/issearthatnight/. That Google Map is showing 100s of GroundOverlays drapped over North America and at the default zoom is showing low resolution images from NASA. If you zoom in, all the GroundOverlayEX objects auto-switch to high resolution images from NASA.
The zoom-switching is completely configurable in the class, and can have as many different per-zoom-level images as you want.
If you talk about the Indoor level picker of Maps, you need a processed floor plan by google.
To do this, go to (your plan will be visible by all on GMaps) :
https://www.google.com/maps/about/partners/indoormaps/
A simple GroundOverlay is just a layer, the only possibility to do that is to create buttons for changing floor...
Thanks, I'm using Leaflet with the leaflet-indoor library (https://github.com/cbaines/leaflet-indoor) to do that.
This is an example of what I want to do: http://cbaines.net/projects/osm/leaflet-indoor/examples/
Still accepting help or advice on this subject...

Overlapping markers/labels in Google Map API v3

I have a google map with several markers/labels placed very very close to eachother.
So close, that if the zoom-level is at a certain level all the labels are overlapping.
In order to be able to read all the labels when the map loads and when the zoom-level changes, I want to place the marker with a certain offset of the actually point with a line drawn to it.
I have tried to implement the "OverlappingMarkerSpiderfier" by George MacKerron, but according to the author himself, it can't be done using his code (due to the fact that his code is tied to an "onClick" listener and can't be executed during loading of the map or change of zoom-level)
I hope the above description is understandable dispite the fact that english is not my native language.

Google maps styling query

I've played around with the FusionTablesLayer Wizard (http://gmaps-samples.googlecode.com/svn/trunk/fusiontables/fusiontableslayer_builder.html) to create a map of wind turbines in North Devon.
http://www.thisisnorthdevon.co.uk/images/localpeople/ugc-images/275834/binaries/WindTurbines.html
But there are two problems.
The first is that the styling that I'd created within the Fusion Table layers has not carried through. Is there a switch to force the layer to take on this styling?
The second is that I don't want the shapefile layer to be clickable. How do I turn this off?
But there are two problems.
The first is that the styling that I'd created within the Fusion Table layers has not
carried through. Is there a switch to force the layer to take on this styling?
Not sure what styling you are asking about. Is it styling defined in the FusionTable? By the FusionTables Wizard? It looks like you may be missing the application of the styles to the map this or the equivalent:
map.setOptions({styles: styles});
You might want to review the documentation on styling the map
The second is that I don't want the shapefile layer to be clickable. How do I turn this off?
To disable clicks on that FusionTablesLayer, use the suppressInfoWindows option when you construct it.
your page with infowindows suppressed on the polygon layer and styling, note that your html is invalid (no body).

Grouping layers with groext - openlayer overlays menu

i can't find out how to grup layers like in this example
http://dev.openlayers.org/releases/OpenLayers-2.10/examples/controls.html
press the upper + button
as you can see there's a checkbox and two radio buttons
anyone knows a way to group layers so that they are displayed under the same group and it's possible to choose only one among them? (radio button)
thank you
You can try using GeoExt tree to do this, like this:
http://api.geoext.org/1.0/examples/tree.html
At this time OpenLayers does not support grouping beyond those mentioned by Brian above.
What are you trying to display on the layers? Vectors can be combined with styleMap. You might want to try is to make your layers base layers instead of overlays.
In OpenLayers there are 2 types of layers: base layers and overlays. When you add more than one of either of these to a map you get slightly different behaviour.
Base layers can only be displayed one at a time and a radio box is displayed to select which one is displayed. Check boxes are displayed for Overlays because any number of overlays can be displayed on top of a base layer. More information and examples are available on the wiki.
You

Categories