-1
votes
0answers
18 views

Leaflet js , z-index for geojson polygon

Can I set z-index for geojson polygon so that it lies between tile layer?
1
vote
1answer
31 views

Leaflet - how do you get individual markers from a featurelayer?

In Leaflet, if I have a feature layer filled with markers, how do I get these markers back from the layer? I want to apply different popups to each individual marker, instead of the entire set. I ...
1
vote
1answer
40 views

Why doesn't my Mapbox + Leaflet viz look retina-friendly?

This is probably a very simple question but it's not clear to me. The Mapbox docs say: When you create a project from the editor, Retina (high resolution) tiles are automatically used on ...
1
vote
1answer
31 views

Leaflet: How do you use removeLayer?

This is driving me mad. See the Leaflet tutorial for adding a layer control to your map: L.Icon.Default.imagePath = "Scripts/images"; var mapUrl = ...
1
vote
2answers
126 views

How to style geojson polygon using L.mapbox.featureLayer()

I have this code: var SupIncend = L.mapbox.featureLayer().addTo(map); var ArbolesAntes = L.mapbox.featureLayer().addTo(map); var ArbolesX = L.mapbox.featureLayer().addTo(map); var ...
2
votes
0answers
34 views

Stray horizontal lines after converting from GeoJSON to topojson

After converting a GeoJSON file to topojson, and loading the topojson into Leaflet, stray lines appear in the resulting map. Like this: What is causing this? If I view the GeoJSON, these stray ...
1
vote
2answers
176 views

Adding multiple layers with timed delay in Mapbox/Leaflet

So I've got a Mapbox map showing data split into several layers. I'd like the user to be able to click a play button to call the function "gogogo", and then the layers get added one at a time every 1 ...
5
votes
1answer
592 views

Generating Interactive Tiles using Nodejs, Mapnik, and PostGIS for Leaflet

I am looking to do something like this but where I have all the data on the same server. I've been following through the set of tutorials @ sparkgeo.com/labs/big/ and I'm having some difficulty. ...
1
vote
1answer
98 views

Why doesn't LeafletJS complete the conversion when re-projecting to Spherical Mercator?

When I use the Mapbox Leaflet pre-packaged Projection class SphericalMercator to project a lat/long coordinate into EPSG:3857 I have to multiply the result Leaflet provides by the earth's radius. ...
1
vote
1answer
112 views

Opacity contrl for mapbox map with several layers

This is an example of how opacity can be changed for a Mapbox.JS map: https://www.mapbox.com/mapbox.js/example/v1.0.0/opacity/ The example shows only one layer used. With barely any experience in ...
1
vote
1answer
45 views

Query data without opening up database?

I have a bunch of polygon data that I want users to be able to sort/filter based on certain criteria. I have the data in a CartoDB table, and can pretty easily use some SQL calls to achieve what I ...
0
votes
1answer
600 views

Which are the Geojson css style properties for mapbox.js?

I try to style a LineString in a Mapbox Map through L.Geojson and all the style properties I could find are: fillColor, colour, weight, opacity. Does anyone know if there is something else? For ...
0
votes
0answers
119 views

Updating Mapbox map to newest API/getting markers to load

I'm new to the Mapbox API (and to Javascript in general), so please bear with me. I am trying to build an interactive map that automatically cycles through map markers as the user scrolls through ...
2
votes
0answers
594 views

How can a leaflet SVG overlay be placed outside of the leaflet-overlay-pane?

I have SVG on top of GeoJSON in my map. How can a leaflet SVG overlay be placed outside of the leaflet-overlay-pane while keeping GeoJSON in place in the leaflet-overlay-pane? (For example, how could ...
1
vote
2answers
2k views

how does one reset map.fitbounds (zoomtofeature()) to the original zoom?

I have a lovely map setup using Leaflet with MapBox tiles (only). It is a United States map with polygons for each state with an onclick event to zoomToFeature. The basic zoomToFeature() function ...
1
vote
1answer
549 views

Unable to get Mapbox leaflet-omnivore to load markers from .csv

I'm using the Mapbox.js API to build a really simple web map using a .csv file to place markers with tooltips. I'm trying to use the suggested leaflet-omnivore library to easily parse the csv and ...
2
votes
1answer
201 views

How to get data from TileMill tileLayer properties in Mapbox for click/hover

I've successfully used Leaflet to load a geoJSON polygon-shapefile with data, and added click and hover interactivity to the layer. For a large dataset, I switched to mapbox.js 1.6.1, used TileMill to ...
2
votes
3answers
109 views

Start-Marker from geojson polyline

i have a map with some walking- and bike-routes and popups with a few details and a picture. Now i want to set a marker on the first vertex of a geojson polyline, but i cant find out how. Btw. i´m ...
1
vote
1answer
962 views

Add simple image layers to MapBox / Leaflet?

Is there an easy way to add simple image layers (with no, or very limited, GIS data) to Mapbox and/or Leaflet? Google maps seems to have the ability to add custom layers, simply by attaching the SW ...
0
votes
1answer
275 views

Mapbox markerLayer from GeoJSON with prompt as input not working

I am trying to display a pin on a map. It works fine if I code the GeoJSON data into the script of my file. If I try to insert the GeoJSON data via a user prompt, it doesn't work. The variable must be ...
2
votes
1answer
457 views

How can I load stricly tiles within the current viewport in Leaflet.js?

I have tiles that are not available for the whole map. How can I stop Leaflet.js/Mapbox.js from making requests to these tiles? There are dozens of 404's that I'd really like to get rid of. Thank ...
0
votes
1answer
116 views

How can I extend L.mapbox.legendControl?

I'm trying to override legendControl.onAdd, but I can't seem to do it early enough. I can override the other functions, since they're fired after map init, but I can't seem to change the prototype? ...
0
votes
1answer
148 views

Chorpleth Data visualization in Mapbox Leaflet API

I am using Mapbox Leaflet API. I have followed the following tutorial of Mapbox. https://www.mapbox.com/mapbox.js/ (Please change to Data visualization Tab) Onclick its zooming on state and hover ...
2
votes
1answer
199 views

How to efficiently render and enable user interaction on thousands of points with Leaflet?

I've got a large dataset comprised of about 10k points representing gas stations. Some of these gas stations sell diesel fuel, others do not. In my web map, I want to let the user switch between ...
6
votes
5answers
385 views

Is it possible to redesign OpenStreetMaps tiles?

We have an application working with open layers and are using open street maps for the map tiles However they don't look great Is there anyway to style these maps? I read something about Mapbox but ...
3
votes
2answers
417 views

Slippy map format

When do you decide which to use? I've started using Geoserver and it seems like map files are downloaded to the browser (using Leaflet) in the WFS format. When I look at OSM, Mapbox etc, they use ...
5
votes
1answer
1k views

What is the difference between Leaflet and Mapbox?

What is the difference between Leaflet and Mapbox, and how are they used together? Like the API and what exactly are they and is Mapbox using Leaflet?