WMTS Layer Syntax for Leaflet - leaflet

I already tried to implement "http://api.ign.fr/tech-docs-js/examples/js/geoportalLeaflet.js, but it does not work for me.
I want to implement the following WMS Tile Layer:
https://www.wmts.nrw.de/geobasis/wmts_nw_dop20
Could someone help me ?

Related

Mapbox linked to outside chart to show elevation

I am wondering if it's possible to do something like this with Mapbox GL:
https://raruto.github.io/leaflet-elevation/examples/leaflet-elevation_geojson-data.html
I would like to have interaction between a chart and Mapbox by moving the marker either on the chart or either on the map.
I googled for this but i didn't find anything for Mapbox GL, just for Leaflet.
Currently i'm using Chart.js and Mapbox and i don't see how to manage to reproduce the above example.
Any hints maybe?
Thanks a lot
I can confirm for you that it is possible to build something like this using Mapbox GL JS.

Vaadin leaflet combining markers

I have a V-Leaflet map.
Depending on what the backend "says" (where/how-many), there'll be marker(s) on this map.
When 2 or more of these markers are closely located and thus overlap,
i'll look to combine them into one marker that refers to them all.
The only way i can think of is the explicit way -- getting the Bounds (org.vaadin.addon.leaflet.shared.Bounds)
of the portion of the map in view and going from there
(calculate how close/apart now those markers are, group/ungroup them accordingly.)
Is there a built-in/quicker way of doing this?
Note: i'm not interested in the mathematical/clustering part of the problem.
checking just not to miss out -- dont wanna redo if this is coded.
TIA.
Sounds like you are looking for V-Leaflet Markercluster extension:
Server side api for Leaflet Markercluster extension
It wraps Leaflet.markercluster plugin:
Provides Beautiful Animated Marker Clustering functionality for Leaflet, a JS library for interactive maps.

How to access vector objects in mapbox styles(road, water etc.)?

In mapbox studio I have a lot of layers for customizations. Is there a way to access those layers programmatically with js. For example hide all WATER or ROAD layer on the map with js?
Thanks.
You can try using https://github.com/mapbox/vt2geojson to get geojson data for whichever layers you are interested in and then use this data and add styling using mapbox gl js maps.
Hope that answers your question.

Leaflet - Layers and sub layers

I want a Leaflet layer control which when checked/unchecked must display/hide all the sublayers inside the main layer. I also want to check/uncheck the sublayers independently. I looked through Leaflet docs and forums but couldn't find any reference for this. Should I write a custom control for this? Please advise.
I believe you are going to need to have to write a custom control for this, as L.Control.Layers does not have nesting support built in currently.
You can try using LayerGroup. From official documentation:
LayerGroup
Used to group several layers and handle them as one. If you add it to
the map, any layers added or removed from the group will be
added/removed on the map as well. Extends Layer.
Usage example
L.layerGroup([marker1, marker2])
.addLayer(polyline)
.addTo(map);

WMS layer not shown over Google Map plugin layer in Leaflet application

I have a simple Leaflet application containing 3 layers: OSM layer, Google Satellite layer (from Pavel Shramov plugin) and my own WMS layer.
My WMS layer show well over OSM basemap but when switching basemap to Google layer with layers control, Google Satellite layer show well but my WMS is not shown over it.
Exploring in Firebug tell me that my WMS images are there but not shown correctly OVER Google layer... This was working well using old version of Leaflet js/css but I want to use the new release 0.4.2...
Any idea how to patch this issue?
Thanks a lot
Etienne
Finallly, adding this line:
$("#" + this._container.id).css("z-index", "auto");
in the _initContainer() function of the Google.js plugin solved the problem...
Check this conversation for more detail: https://github.com/shramov/leaflet-plugins/issues/29
Regards
Etienne