An Open-Source JavaScript Library for Mobile-Friendly Interactive Maps

learn more… | top users | synonyms (1)

0
votes
1answer
20 views

Change marker within leaflet map when loading data from geojson file

This section of code adds markers to my map (it works), how can I change the marker to a different icon when dealing with geojson? var cycleracks = $.getJSON('cycle-racks.geojson', function (geojson) ...
1
vote
1answer
20 views

Labelling Icons in Leaflet

I am using leaflet to create a set of points, but I want to view which one was plotted first, last, etc. Is there way to label them such that when the first point is plotted, it will plot a circle ...
15
votes
6answers
15k views

How to Create Animated Cluster Markers in OpenLayers/Leaflet?

I want to use Leaflet due to the smooth transitions which Openlayers seems like they can't match. I specifically require the ability to cluster markers with custom styled marker groups. The best ...
0
votes
1answer
31 views

Handling Errors with Esri Leaflet Dynamic Map Layers

I have an application that is using ESRI for leaflet to pull in MapServices. I can successfully pull in map services and render in my application. However, sometimes the map services return an error ...
1
vote
0answers
62 views

Geoserver create generic dynamic style

I'm quite new to GeoServer, and I wonder if it is possible to create a dynamic style. I got a big shapefile with more than 600 variables, and I want to create a generic style where you can input the ...
1
vote
0answers
11 views

Modify sidebar information caused by marker click [closed]

First time poster here, hopefully someone can point me in the right direction! Pretty new to Leaflet, HTML, and CSS in general so this project has been a great learning experience for me but I've ...
0
votes
0answers
19 views

Leaflet geoJSON point layer with divIcons (SVGs) how to toggle visiblity?

I have posted a few related questions about this topic here here and here. I have tried to set the opacity of the layer, then reset it with setStyle on a zoom event like so: Layer18 = ...
4
votes
2answers
2k views

Which plugin can draw topoJson right within Leaflet without conversion?

I already have asked how to reduce file size and increase performance for publishing spatial data on the web using Leaflet, here. A conversion to TopoJSON has reduced the file size by approximately ...
0
votes
2answers
250 views

iterate over cluster in markerCluster : leaflet

i need to iterate over all clusters that are currently present in markercluster using leaflet. there's a method called markercluster.getClusters() in googlemaps to do this job. is there something ...
1
vote
1answer
3k views

Leaflet: how to use a custom marker on a geojson layer?

I'm trying to put on a Leaflet map a geojson and all works fine until I use the default blu marker. Now I'd like to use a custom marker (a little .png icon) and I've changed my code in the follow ...
3
votes
1answer
110 views

Is it possible to hatch format railroads in leaflet?

Within mapbox tilemill it is possible to make make rail-roads like this: To achieve this you need to write the following code: Source #railroads { ::line, ::hatch { line-color: #777; } ::line { ...
6
votes
2answers
94 views

Leaflet marker/icon help

I am trying to get the default marker NOT to show, but it's coming up WITH the icon that I want, so I have a marker and icon like this: I'm getting my data from a OSM nomination search result. if ...
0
votes
1answer
36 views

Loading Leaflet raster layers asynchronously before adding them to the map?

I am working on a web application where users can view sequences of 5-10 GeoTiffs overlaid on a map, and played like a slideshow - show the first Geotiff, wait a few seconds, show the second, and so ...
4
votes
2answers
85 views

How to make both hover and click popup work?

I am pretty new to all of this... I want to have a hover/mouseover AND click popup work on my geojson layer. Here is the code so far, but I don't know where to include the hover without messing up the ...
2
votes
2answers
91 views

Simplify GeoJSON by retaining external boundaries (clustering)

I created a website (http://www.cartescolaire.paris) that basically loads a GeoJSON and displays it on a map using Leaflet. This geoJSON is pretty large (over 2 Mb), the loading time can be very long ...
2
votes
1answer
60 views

Mutually Exclusive Bootstrap Checkbox Switches as Layer Control

I have this JSFiddle with two checkboxes using Bootstrap Switch that changes the layer visibility in Leaflet. I would like them to be mutually exclusive, i.e neither of them can be on or off at the ...
5
votes
3answers
528 views

great circles in QGIS and export in 3857 webmap

My plan is to visualize great circles in a leaflet webmap. So coming from this great postgis article and R version I thought it would work like this in QGIS: create line from two points, store ...
0
votes
0answers
35 views

Leaflet - invalid map extent

I have a Leaflet map with a GeoJSON polygon overlay. When clicked on a polygon, map is suppose to zoom to the selected polygon: this.map.fitBounds(layer.getBounds()); I'm experiencing strange ...
1
vote
1answer
32 views

Set view does not work after Fitbounds

I have a map and a layergroup. var map = L.map('map').setView([27.6758,85.3313], 12); L.tileLayer('http://{s}.tile.cloudmade.com/8ae544230be74379927e6dee5d416398/997/256/{z}/{x}/{y}.png', ...
1
vote
1answer
64 views

Check if circle is within polygon/rectangle/circle in leaflet and turfjs

I am using leaflet and turfjs. I am able to check whether rectangle/polygon/point is within another polygon. But I am not able to check the same for circle. I want to restrict user to draw circle ...
4
votes
1answer
60 views

leaflet GeoJson vs polyline

Is there any real advantage in using L.GeoJson instead of Polyline when drawing paths in a map powered by Leaflet? I know that GeoJson can attach additional options. It is also possible with ...
2
votes
3answers
236 views

Custom Styling OpenStreetMap without needing to host it yourself

I know it's possible to edit the way in which OpenStreetMap display, with CSS-like (like MapCSS) stylesheets. Is possible to do this without having to host your own tile server?
-1
votes
1answer
58 views

export shapefile [duplicate]

I want a button "export" as i clicked on it the shapefile should be downloaded along with it's all files shp, shx, prj, dbf as zip folder. My project is GIS based in which i have two main tasks: 1. ...
0
votes
2answers
161 views

Leaflet TimeSlider not showing points correctly

I'm trying to add about 13 thousand points in a map using the TimeSlide plugin, but my points are not following a logical order of appearance. When I use the slider I get the dates in the box below in ...
1
vote
0answers
38 views

Export ShapeFile from layer file lyr

I want to export shapefile from geojson. I am getting the all data of dbf file in console. My project is based on GIS. I am using LeafLet for that. How can I get a shapefile and it's all supportive ...
2
votes
0answers
51 views

Alternative basemaps for leaflet

I am interested in creating a web map application, that will display a map of my country and various files (.tif, shp) on top of it as layers and i decided to build it on top of leaflet. So when i ...
2
votes
1answer
44 views

How to keep vector layer on top of all layers despite toggling order?

How do I keep a layer on top of my other layers despite the order it is toggled by the user? In this example, I've set up two layers named layerONE and layerTWO. How do I keep my layerTWO (red ...
1
vote
1answer
39 views

Leaflet : load & remove layer at specified interval time

I want to load and remove a layer in a specified interval of time. I make it blink with a random color function associate to my layer style. I can load this layer multiple times, unload it in a ...
0
votes
1answer
95 views

Do all open source web mapping platforms require programming? [closed]

I currently use a proprietary software product for my company's web mapping, however I am interested in seeing other products. I use QGIS and would like to to put my layers on the web for both ...
2
votes
3answers
2k views

How to determine intersection between geojson feature and given coordinates?

I'm overlaying a leaflet map with features of geojson, fetched with d3 and added as SVG elements to the DOM. My geojson contains too many features to render at once, so my goal is to add to the map ...
8
votes
2answers
8k views

Trigger a click event on a leaflet map?

Is it possible to make a click event occur at a particular lat/lon on a leaflet map? I would like to make a popup appear that is associated with a point at a particular location. I have tried several ...
4
votes
0answers
36 views

Is it possible to use a raster::click event within an interactive leaflet map?

Data Download: https://www.dropbox.com/s/f849ra8l6umo9d8/crops.tif?dl=0 I have various raster images of the world that I would ultimately like to plot within an interactive leaflet map; an example is ...
0
votes
2answers
35 views

Tweaking location of zoomControl (cartodb.js)

I have succeeded in creating a header outside of the CartoDB UI, but the header is blocking the zoom controls, as can be seen below. Is there any way to modify the zoom control location to adapt to ...
0
votes
1answer
56 views

Querying feature info for L.esri.dynamicMapLayer “bbox must be specified”

I have a Leaflet map in which I am displaying an Esri ArcGIS REST layer, using L.esri.dynamicMapLayer(). The code that initializes this layer is passed the URL to the service and a comma-separated ...
0
votes
1answer
55 views

Does leaflet support user defined Layer identifiers

It would be nice to be able to check for a layer presence or remove it without having to keep an explicit reference to it. To that extent I would like to use ad id for the layer that I can compute ...
1
vote
0answers
42 views

Leaflet custom info control update with extra parameters

I used custom info control to show information.The below code is working: var info = L.control(); info.onAdd = function (map) { this._div = L.DomUtil.create('div', 'info'); this.update(); ...
3
votes
1answer
84 views

Leaflet pop-up does not work with Geojson data

I have a geojson file(Polygons).I want to display it on a leaflet map and when user clicks on a polygon, a popup with an information should be visible. The information is 'type'. I am able to see the ...
0
votes
1answer
66 views

What's the most appropriate way to load Mapbox Studio tiles in Leaflet?

I'm updating a Leaflet map's basemap, and I'd like to use Mapbox to create this basemap. At first I thought I would have to ditch Leaflet and switch entirely to Mapbox GL. After digging around in the ...
2
votes
1answer
44 views

Update Bootstrap Switch with Leaflet Layer Group

I have this JSFiddle that shows two example layers that can be toggled on and off using the Bootstrap Switch to add and remove them from the map; this works fine. The problem I am having is updating ...
1
vote
1answer
85 views

how to bound markers with base layers : leaflet

I been working with leaflet control and here i stuck for a while.... I have multiple base layers, and user can toggle between these layers. these layers have separate drawing controls. When i add ...
1
vote
0answers
35 views

CartoDB: how to let users update data from the map infowindow [closed]

In cartoDB, I have a map showing public lands in a German city. I want to integrate a form into the cartoDB infowindow to let the user update the data table. How can I pass the values from the form ...
3
votes
1answer
121 views

Leaflet: How to style my polygons in a GeoJSON layer?

I am trying to figure out why my polygons are not changing color based on a value I have in my GeoJSON. I've set up a hypothetical test here to replicate my issue here. JSFIDDLE link here My data ...
3
votes
2answers
76 views

Leaflet JS - Add text to circles

I am trying to create a map using Leaflet with circles that indicate distances on the map at current zoom level (map scale). See illustration below: I know how to calculate sizes and update the ...
3
votes
1answer
72 views

Leaflet Choropleth Map

I'm trying to create a choropleth map using leaflet. When running the code below the map just comes up with each county being the same color. How do I get each county to be colored based on the data ...
5
votes
3answers
7k views

How do I add my own map layers to Leaflet

I have a Leaflet map and want to add two of my own small polygon layers (currently in shapefile format, but they could be converted to GeoJSON). Can this be done without a mapserver to publish them ...
0
votes
1answer
38 views

JSONs made from shapefiles are not plotting (using folium or Leaflet alone)

My goal is to plot two shapefiles as layers on an interactive map. The files I'm using live at https://github.com/AnnaMag/maps. I transformed shapefiles to .geojson using ogr2ogr -f ... e.g. ...
2
votes
4answers
1k views

Using geojson hosted on GitHub from Leaflet: it doesn't work

I'm trying to use a geojson hosted on GitHub (rif. https://raw.githubusercontent.com/cesaregerbino/DatiGeo/master/ScuoleTorino.geojson), from Leaflet. here you are my code .... My first ...
0
votes
2answers
48 views

Leaflet pass geoJson parameter to onEachFeature method

I created geoJson object as below: var geoJson= L.geoJson(groupingLevelType.type, { style: style, onEachFeature: onEachFeature }); function ...
0
votes
0answers
12 views

TimeDimension in R, leaflet [duplicate]

it's possible to do this this with R,leaflet ? any suggestion please?
1
vote
1answer
49 views

Serving data based on tiles

I am new to mapping and displaying data on maps. I was trying to display markers on a map where each marker represents a point of interest on my map. Using leaflet it is quite straight forward to add ...