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

learn more… | top users | synonyms (1)

0
votes
1answer
200 views

Using Leaflet: How do I get it to display one popup based on a condition?

Using Leaflet: How do I get it to display one popup based on a condition. See below. basemap_0.addTo(map); var layerOrder=new Array(); function pop_thunder(feature, layer) { ...
2
votes
1answer
51 views

Leaflet map draggable marker events

Everytime I click on the map I create a draggable marker with a drag function. It works great, however everytime I release the mouse after I dragged some marker, the click event of the map is ...
0
votes
1answer
41 views

Filtering GeoJSON data to include in Leaflet map

I am trying to filter through my geojson polygons and get all data entries with a specific attribute. I have a layer of polygons describing parks around the city parks.json. I want the user to click ...
1
vote
1answer
30 views

KML google in Leaflet

I know that GeoJson is suported in leaflet but how about kml ? is there any plugin for reading kml data in leaflet?
1
vote
1answer
22 views

Leaflet: Panes and Popups

I have a leaflet map with a circleMarker layer that has a popup. This works as expected. dotLayer = new L.geoJson(dots, { pointToLayer: function (feature, latlng) { return ...
0
votes
1answer
20 views

How to add Leaflet controls in an outer div

What is wrong with this code ? var mapbuttons_div = L.DomUtil.create('div', 'mapbuttons leaflet-bar leaflet-control'); var zoom = L.control.zoom( { position: 'topleft' } ); ...
2
votes
0answers
30 views

how to load raster image in leaflet? [closed]

I want to load a raster base layer in leaflet because the base layer usually needs an internet connection I want to load the raster offline .
0
votes
1answer
35 views

Mapbox free billing period

I am trying to use mapbox instead of leaflet to allow client to modify in the map if needed because I found in mapbox studio a friendly interface for modifying the map . Is the free period in mapbox ...
0
votes
1answer
960 views

Positioning leaflet divIcon when adjusting size using css

I am using the L.divIcon when using iconSize:null which is causing iconAnchor:[0,0] to not be recognized,my code looks like this: var divIcon =L.divIcon({ className:'current-location-icon', ...
3
votes
1answer
44 views

Better (faster) way to join a csv to a geojson in Leaflet?

My goal: Store the attributes of a geojson in a csv file Allow a non-GIS user to edit a cloud-hosted csv file which then updates a webmap Have the web map be a static app with no GIS/PostGIS/SQL etc ...
1
vote
1answer
450 views

Leaflet update getcenter coordinates

I am bringing in leaflet routing control into my map and I would like to have the route icons show up in the center of the current view. using the code below I can get the icons to show up at the ...
0
votes
1answer
237 views

How to filter polygons in Leaflet using range slider

I have a map I'm working on with Leaflet that displays a choropleth of zip code-level data. One piece of functionality I would like to add is to allow users to use a range slider to filter out ...
2
votes
0answers
38 views

Draw raster on top of a Leaflet map

I want to implement a raster layer on top of a Leaflet map that includes the following functionalities: Digital Elevation Model (DEM) terrain height included in each raster cell GPS-Track (I use ...
1
vote
0answers
28 views

Load a raster file directly in leaflet

Is it possible to load a raster file (e.g. geotiff or erdas img) directly into a Leaflet map? If so, can you guide me to the correct documentation or method to do this? I am trying to do this with the ...
1
vote
2answers
4k views

Syling Leaflet Maps

Is there anyway to style base maps using Leaflet? I know there are quite a few options for loading different pre-made styles (such as Stamen, Mapbox, etc...), but I am looking for a way to create my ...
1
vote
2answers
576 views

Polygon intersection with bounding box with polygon's holes intact

I am trying to serve GeoJSON FeatureCollection tiles with each feature's geometries trimmed to the tile boundary. I am working on a Leaflet plugin to re-assemble the geometries. It works by building ...
0
votes
2answers
27 views

Leaflet: Are Bing Maps tiles exempt from restriction to use only with Bing Maps?

Leaflet has a plugin that can fetch Bing Maps tiles. However, I see in the Bing Maps terms of use the following prohibition: 8.2 d) Use Content, including geocodes, other than via an ...
1
vote
0answers
27 views

MarkerCluster OR SuperCluster OR Vector OR [closed]

currently I'm working with many GeoJSON-Point-Objects. For my testing I use Leaflet with plugins (MarkerCluster, SuperCluster) and to compare them I tried OpenLayes with a cluster-vector solution. ...
-1
votes
0answers
17 views

SuperCluster get only null [duplicate]

currently I'm working with many GeoJSON-Point-Objects. For my testing I use Leaflet with plugins (MarkerCluster, SuperCluster) and to compare them I tried OpenLayes with a cluster-vector solution. ...
0
votes
1answer
39 views

CQL filter not displaying in leaflet.js

I have a CQL filter that only displays a certain number of points, however when I try to apply the CQL to my existing leaflet map through the options for a layer nothing displays. No errors are thrown ...
0
votes
1answer
56 views

Hide and show markers in a Leaflet map using zoomend [closed]

How to hide and show markers in a Leaflet map using zoomend. Example jsfiddle.
1
vote
2answers
256 views

Leaflet and census block data: not displaying

I am new to leaflet and am trying to load a geojson file showing census blocks and associated information for a city in CA. It is a small city and not too many census blocks. I cannot get the popup ...
2
votes
0answers
19 views

Filter data from WFS request in Leaflet

In the past I have used OpenLayers in order to make WFS requests to geoserver and show features on a map. I have also used WFS rules in order to filter the data based on specific values. Now I am ...
1
vote
2answers
70 views

Using a proxy for unsecure Mapquest layers in Leaflet L.tileLayer call

I have a web mapping client that needs to be secure and use only HTTPS requests for layers. I would like to include some basemaps such as Mapquest OSM and OpenSeaMap which do not (as far as I can see) ...
1
vote
1answer
74 views

How to add OpenSeaMap tiles as an overlay on top of osm base map with Leaflet?

After generating the OpenSeaMap tiles, I tried to add them as an overlay upon the openstreet basemap. The idea is after generating the OpenSeaMap tiles to serve them as "static" tiles to the client, ...
0
votes
1answer
24 views

Leaflet control layer update

I am using this example to setup a control layer. http://leafletjs.com/examples/layers-control.html L.control.layers(baseMaps, overlayMaps).addTo(map); How do I just update overlayMaps with latest ...
0
votes
1answer
14 views

Add WFS layer(json) in leaflet using leaflet layer tree control

I'm using the layer tree control to manage the display of layers. When I add WMS services, it works fine. But when I add WFS , this is not loaded. I'm using the leaflet layer tree plugin code and ...
1
vote
0answers
23 views

Changing layer color with a button click

I am trying to change the color of my map layer when filter buttons are selected. So, the goal is: the user sees all of the data in one color. Then, when they click on a filter button, only a subset ...
1
vote
1answer
43 views

Leaflet GeoJSON with projected coordinates (3857)

I am trying to get a GeoJSON with projected coordinates to show in Leaflet. I have no problems loading GeoJSON with lat/lng (EPSG:4326). Here is a fiddle where I load the GeoJSON with unprojected ...
0
votes
1answer
516 views

How to add layers and update layer control dynamically : leaflet

Introduction I am working with the lealflet api, where user can draw shapes to map(image)... Initially the layer control(handling 1 layer) is added for base map using imageoverlay...... ...
0
votes
1answer
220 views

Add an event listener on a Marker in Leaflet

I am using leaflet in order to render a map. I created a map with markers and i dont know how to implement the Event Listener 'onClick' on each Marker. My code var stops = JSON.parse(json); var map ...
0
votes
1answer
17 views

How to make a WMS GetFeatureInfo request in Leaflet?

I am trying to make a WMS GetFeatureInfo request using Leaflet. I can not find something in the documentation to describe this process. Can you please provide with an example demostraing how to do ...
0
votes
1answer
25 views

Accessing HTML using jQuery within LeafletJS popup.

So I want to add some HTML code to a Leaflet popup, but I also want to be able to to perform some jQuery functions when this HTML is clicked, like so: .bindPopup( "<button id='clickHere'> ...
2
votes
2answers
359 views

How to tell if a GeoJSON path intersects with another feature in Leaflet?

I have an application where the user draws a path (a series of connected straight lines) and this path may not intersect any feature in a particular GeoJSON layer. I need to check that no point along ...
0
votes
1answer
220 views

map.on('click') event disables the double click zoom

I have a map that has an onclick event fired and displays a marker where the user has clicked. Problem is that this event seems to overrun the double click event. Because of this, when I double click ...
2
votes
1answer
46 views

Mapbox - Images as Maps

In the past, by following this tutorial by Tom MacWright, I was able to in a few steps display any jpeg images as an interactive map with Mapbox. The steps are summarized below: Run a python script ...
0
votes
0answers
9 views

Stop leaflet popup on nodata areas

I'm working with leaflet.js and some wms services. I've been playing around with L.TileLayer.BetterWMS.js but am getting the same problem with the standard leaflet.wms.js plugin. I would like to ...
0
votes
1answer
552 views

Leaflet geoserver wms doesn't show on google map base layer

I have a site running Openlayers (base layer google and overlay wms in epsg4326 from geoserver). The site works fine. I've decided to try doing the same with leaflet , and from some reason I can't ...
0
votes
0answers
100 views

How to draw custom lines and animate markers on it : leaflet

Introduction: I am working with the leaflet api, i have implemented a script which will put marker on map(onClick) and animate marker to the position i have set..... Problem I have to ...
0
votes
1answer
436 views

How to use leaflet-search for a geojson feature property?

I'm trying to use the leaflet-search plugin to search for a specific geojson property (i.e. 'Name'). The trick part of this is I want to perform a search on a Geojson file thats loaded in via the ...
3
votes
2answers
168 views

How to remove a single marker in Mapbox?

I have a simple Marker added to map like this: var x = L.marker([50.5, 30.5]); x.addTo(map); Now how can I hide/remove x? I searched the API docs for a Marker.remove() method, but couldn't find any. ...
0
votes
0answers
23 views

How to return output of WMS/GetMap (Geoserver) request through an API call?

I am working on a web mapping application which is build on Leaflet and Angular JSP libraries and relies on ArcGIS Map Services. We get token from ArcGIS's gettoken API through a WebAPI and that token ...
1
vote
0answers
18 views

Leaflet Mobile Not Working

Trying to get this to work on a mobile device. Works fine on a computer. Anybody have any suggestions as to why it wont show up on my phone? </body></html> ...
0
votes
1answer
25 views

How can i an add image overlay depending on the options in the polygon properties in a leaflet map?

I have a multi-polygon geojson file ( mapInfo ) that has one of the properties named "field_hazards". The hazards include "gale/storm, heavy rain, thunderstorm and Freezing rain "How can i an add ...
1
vote
1answer
882 views

Submit a form from within a leaflet popup?

I want to submit a form from within a leaflet popup simply using javascript and geojson. I am essentially collecting attribute information in the form and then I want to process the information into ...
0
votes
1answer
40 views

Text + Chart inside pop up window in Javascript

A similar question had been posted in this thread : Chart inside pop up window in Javascript I'm trying to do the same, but i would like to add others things in the popup (like text, feature ...
2
votes
0answers
37 views

How to instantiate a new map with proj4leaflet projections from a Bootstrap dropdown menu

I'm currently working on a Leaflet website that will be able to display GPS-Tracks with different projections. Now I'm trying to implement a dropdown menu based on Bootstrap, where I can set different ...
-1
votes
0answers
32 views

Popoup Marker Leaflet Slow open in mobile phone

I'm not an expert , but I've created my base map with Leaflet . The map opens loading markers When I click on the marker , the popup is slow to come out . many times click on a marker to let out a ...
0
votes
2answers
41 views

Layer not staying on top of all other layers

I am trying to keep a specific layer named popDensity on top of all the other layers on my map despite what other layers I may click in the layers control. I am using the Leaflet overlayadd event to ...
0
votes
2answers
18 views

Is it possible to have a Leaflet control with large images / icons

Im trying to create a map where the layer control have large icons or images, and the "buttons" are located in the bottom of the map and not on the sides. I have used the simple controls until now. I ...