now I use leaflet.
I want to know what are their policies about heavy traffic.
like OSM, I have to make another server? then, how can i do?
thanks for answering.
Leaflet is a javascript library and does not provide tiles. So there is no limit in using leaflet.
Your question is more towards the provider of the tiles that leaflet uses.
For example:
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '© OpenStreetMap contributors'
}).addTo(map);
The map you see is actually a set of images (usually 256x256 pixels). There are served by a tiles server. See https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames.
The limitation you want to know is the limitation of the tiles server.
Leaflet is the glue that knows which tiles to show according to the lat,lng you want to show.
The TileLayer you create tells leaflet where it must get the tiles from.
Related
I am new to leaflet. currently I am working on leaflet to render vector tiles. my application's requirement is that on click i should get features from map tiles in geojson format.
In Mapbox map.queryRenderedFeatures(e.point). I want to do exact same thing, but in leaflet. Please check here to check how mapbox is fetching features.
Please help.
Current Leaflet implementation does not supports querying rendered features. Hence switching to Mapboxgl
I want to use openstreetmap to put a marker or zone an area with an overlay for certain locations like farmland or commercial buildings.
Is it possible to do a custom map, where I pan around and put a marker, or an area overlay on these specific places?
Looking at the official openstreetmap client I see now way of exposing this information.
For a farmland I want to add a farm building marker, and for a commercial building a commercial marker for example.
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.
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
I'm using Leaflet and MapBox. I need to develop an api which will show certain city points with labels, and accordingly draw routes between them. I have BlueMarble tiles till certain zoom, and then MapBox Streets. What is the best way to realize that idea? Are circles and paths the best option? Thank you.
I am not sure that you need to create an API for what you want to do.
http://leaflet.cloudmade.com/examples/geojson.html
In the Leaflet tutorials it shows you how to create LineStrings and Points from GeoJson data. So with latitude and longitude coordinates for the Cities you can create Points and use LineStrings to create the routes and add a them as a GeoJson Layer to the map.