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

learn more… | top users | synonyms (1)

5
votes
3answers
63 views

Different values while calculating distance

I'm developing a project using LeafleatJS and PostGIS. Currently I'm getting trouble while calculating distance between two coordinates. For example: Point 1 - lat: -12.99835864475412, lng: -38....
2
votes
1answer
26 views

Can reference system in Leaflet be changed without disrupting data position?

I have a leaflet map that uses default CRS (EPSG3857) with multiple markers placed on it. Their LatLng are read from JSON file. I want to change map CRS to Simple, keeping markers on exact same screen ...
3
votes
1answer
82 views

Leaflet printing does not show pins and map is shifted

I don't exactly why but whenever I try to print my leaflet map with layers, it shows the map a little shifted to the left as well as the pins are not quite ok. I tried using easyPrint() and window....
2
votes
1answer
38 views

Invalid Geojson when drawing multipolyline on the map

I try to display multi line in the map but it return "Error: Invalid GeoJSON object" Here is my code $.ajax({ type: "POST", url: "server/drawPipe.php", ...
1
vote
0answers
59 views

Scale (or stretch) Leaflet map tiles to look bigger

I am using leaflet and I am using the same tile provider as the main openstreetmap's website (http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png). However, leaflet seems to fit many more tiles in 1 ...
1
vote
0answers
24 views

Non-HTML circle text labels on Leaflet map

I need to save image of Leaflet map with polygon, multi-polygons, circles and text below every circle. I have geojson file with circle and polygon coordinates (lat and lng). I managed to get image of ...
1
vote
0answers
37 views

Leaflet polyline not working

I'm trying to draw polyline to connect an array of waypoints. But I'm getting an empty div like this instead of a map with route. My code is this: <script> // set center ...
1
vote
0answers
17 views

Leaflet _onDrag throws TypeError: this._positions is undefined

I am creating a map using the MapQuest API with Leaflet. Up until today the map worked fine in development and no errors were being shown in FF dev console. This morning when I was giving a ...
2
votes
2answers
57 views

Convert/display grayscale image as RGB

i want to display raster images using a color palette in a leaflet map. The images are tiled (gdal2tiles) from a single .tif to multiple .png files with values from 0 to 100. I add the image using ...
2
votes
2answers
28 views

Render rotated symbols in Leaflet

I have point with an attribute for each point's 0-360 direction. I need to render these points in Leaflet with arrows pointing in their respective directions. Is there a plugin or code I can use to ...
1
vote
2answers
41 views

Remove layer switcher controller in leaflet

I have created a map in leaflet and added an overlay as: map.layerscontrol.addOverlay(tile_layer,"{{ resource.title }}"); map.addLayer(tile_layer); The map shows great and the layer as well. Now I ...
4
votes
1answer
128 views

How can I change popup position on leaflet marker?

I want open a popup on bottom of my marker icon in leaflet. my code: var mymap = L.map('mapid').setView([51.505, -0.09], 13); L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?...
3
votes
1answer
120 views

Using MSID/MID with leaflet to display Google My Maps data

I'm wondering if there is a way to display MSID/MID with leaflet. I found this forum below; Any way I can load KML data from Google maps (again) via JS API? KMZs work fantastically with the arcgis ...
2
votes
2answers
60 views

Leaflet zoom less than default

How can I make leaflet zoom less with mouse wheel ? If I move my mouse wheel as little as I can, it zooms like 3 levels.
1
vote
1answer
90 views

How to check if a leaflet layer is already added on the map?

I build a simple map app where I have a layer on top of a map. How can I check in leaflet, if the layer is already present?
1
vote
1answer
39 views

Leaflet javascript in popup

Can JavaScript be included in a leaflet popup? We have modified this example To this :- var this_marker = L.marker([51.5, -0.09]).addTo(mymap).bindPopup( '<div style="color: red">Hello<...
2
votes
1answer
23 views

Setting (above/under) priority order of layer in leaflet

When I add a layer in leaflet it stays automatically above all layers I want layers to be ordered wich one stays above the other in way that last added layer will not stays above and hide the other ...
2
votes
1answer
118 views

Leaflet Routing Machine: how to dinamically change router settings?

I'm using Leaflet Routing Machine in a litte Leaflet + Javascript map. I'm using Graphhopper as router in this way .... var control = L.Routing.control({ waypoints: [ L.latLng(57.74, 11.94), ...
1
vote
1answer
30 views

Retrieve all feature IDs displayed on the viewport into JSON using Leaflet

I have build a map application using leaflet, where I display a WMS layer from Geoserver. What I am trying to do now is to get all the elements which are currently on the Bounding Box and store them ...
2
votes
0answers
76 views

Converting KML coordinates to Leaflet

I am trying to convert a Google Map KML file to a csv, to map the longitude and latitude points on Leaflet. But the coordinates keep mis-projecting and some end up off the land mass. The steps I have ...
1
vote
1answer
114 views

Add Legend to Leaflet Map

I have a leaflet map that consists of various wms layers representing different years. I am trying to add a legend to my leaflet map but with my own custom hex colours instead of trying to use a ...
1
vote
0answers
40 views

hide and show a feature from group feature with checkbox in leaflet

To begin I will explain the code, I have a checkbox generated after loading the web page by the next code var CPID = new L.GeoJSON(false, { onEachFeature: function (feature, my_Layer) {...
1
vote
1answer
118 views

leaflet.heat heat map highlighting overlapping areas

Lately I've been working on heat maps using the leaflet.heat plugin. I have a set of points in the WGS84-system with the following structure: latitude | longitude | weighting | type The weighting-...
1
vote
1answer
62 views

Fill array with coordinates within geographical bounds in Leaflet

I want to create an array and fill it with geographical coordinates I get from a bounds variable. Basically, a for-loop shall create coordinate pairs within the specified bounds with a fixed distance ...
2
votes
1answer
78 views

Using JQueryUI Slider to change Layer Display (Leaflet)?

Can't seem to figure out how to use JQueryUI Slider to change the layer display on my leaflet map. Scenario is basically, When user slides bar across a dfferent layer shows up on the map (in years) ...
1
vote
0answers
40 views

Display a layer stored in GeoServer with Leaflet

I wanted to display a layer stored in geoserver with leaflet, I used this code but it's not working. var map = L.map('map').setView([4.477411, 21.309284], 3); L.tileLayer('http://{s}.tile....
2
votes
1answer
47 views

What is the difference between using a PolyLine layer and a GeoJSON layer in leaflet?

This question arises because on my project I will have a backend that consists of gpx tracks. Then, my frontend queries it (based on time, location filters, etc.) and I will either get the ...
3
votes
1answer
57 views

Packing polygons without intersection and empty places [closed]

How can I pack polygons without empty places and intersections? Please tell me everything that might help me (API, algorithms, etc.) I'm using: USPS API to get carrier routes. dbscan.js to ...
-1
votes
1answer
49 views

CartoDB Point Clustering and on Hover

I have been working from a sample on point clustering from cartodb. I would like to have an infowindow show when someone hovers over a series of points. This infowindow will display a different ...
1
vote
1answer
84 views

Leaflet : filter with condition

I want to insert a condition in a geojson filter. This condition is based in a variable called here varState: <button id='button1'>button1</button> <button id='button2'>button2</...
1
vote
0answers
26 views

edge Data labelling OSM local tile server

i have OSM tile server running locally on my machine I have used Leaflet to add markers Now I am looking for graph script in which markers to act as nodes and polygon (more precisely an arc) to show ...
2
votes
1answer
92 views

Adding WMS layer with CQL filter

I would like to add to my leaflet's web map layer from my WMS service (Geoserver), but I need to use CQL filter in GetMap link: localhost/geoserver/my_location/wms?(...)&CQL_FILTER=[...] Is ...
-5
votes
2answers
148 views

How to remove attribution in Leaflet

I want to remove the leaflet.com that appears on the right bottom of the screen here
2
votes
1answer
88 views

Highlight feature below mouse-overed track in Leaflet

Currently, on http://velo300.free.fr/debug, feature highlights on 'featureOver' creating a white new feature on top of mouse-overed feature. Problem: i need also to work with 'featureclick' for ...
1
vote
1answer
42 views

32-bit Map tiles for use with leaflet

I've got a lot of single-band Geotiff files with the GDT_Float32 format and I need to present these over the web, hopefully using a webmap leaflet/mapbox/googlemaps widget where clients can hover over ...
0
votes
0answers
33 views

change image of marker in leaflet

This is the code; it works very well //**************************************WFS****************************************************// //**************************************Conteneurs*************...
2
votes
1answer
36 views

where i can add style in this code leaflet

var urlborne = 'http://localhost:8080/geoserver/Gestion-proprete/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=Gestion-proprete:borne&maxFeatures=2000&outputFormat=text/...
1
vote
1answer
63 views

Leaflet display only clicked element of a loaded map layer (polyline)

I am creating a web mapping application that will return appropriate routes based upon ST_length query on a cartoDB dataset. So far, the code below successfully maps those routes with individual ...
0
votes
1answer
66 views

How to apply Mapnik Zoom Level Styling via Leaflet Zoom Levels

I've setup a node mapnik server to render some tiles for polygons. The application I've built to call out to these tiles is in Leaflet An example of a current mapnik styling rule is below <Style ...
2
votes
1answer
55 views

CartoDB SQL API styling individual polyline returns

I am creating a web mapping application that will return appropriate routes based upon ST_length query on a cartoDB dataset. So far, the code below successfully maps those routes (and clears any ...
2
votes
0answers
33 views

WMS Layers from Azure Geoserver not loading with multiple users

I am loading multiple WMS layers into a leaflet web application from an Azure virtual machine Geoserver that pulls data from a PostGIS database on the same machine. The layers load through quickly ...
2
votes
0answers
91 views

Leaflet filter on geoJson properties : multiple criteria

I'm using Leaflet filter on geoJson data. I'm able to apply it with a simple criteria : filter: function(feature, layer) { return feature.properties.field1 == "yes"; } I can also apply two ...
0
votes
0answers
63 views

Loading WFS from Geoserver to Leaflet

I use GeoServer 2.7.0 and Leaflet-0.7.7 and the jquery: <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>` for showing a WFS in my Geoserver. How do ...
0
votes
0answers
25 views

ordering overlays in layerControl

I have an application that adds GeoJSON to a map at various times. When the map loads I add a number of administrative boundaries. However, the user is able to query a database to get lat-longs that I ...
2
votes
1answer
128 views

Leaflet: Map tile request, hidden key/secret via proxy

I would like to request a Leaflet tilelayer without exposing my API key and secret. For example, using the UrtheCast API (but would apply to other similar APIs that embed api_key and api_secret in the ...
1
vote
1answer
81 views

Problem with Leaflet Control Layers using Vector Layers

I'd like to add a Vector Layer and configure it in a Leaflet Map with Leaflet Control Layers. The code is ... <!DOCTYPE html> <html> <head> ...
0
votes
1answer
51 views

Problem with missing tiles in a WMS Service Layer on Leaflet Map

When we load a WMS service in our Leaflet maps, we encountered tiles that do not show. You can see this happening on the following Plunker if you zoom in and pan to the left or right. http://plnkr....
0
votes
1answer
35 views

Is there anyway to combine a static geojson and data from database then display it in leaflet?

I do have a web map application that can load geojson then display it on leaflet map, however I encountered unresponsive script whenever I refresh my page due to big size of geojson. Is there anyway ...
0
votes
1answer
41 views

CartoDB Core with Leaflet

I just recently experimented with CartoDB. I have an existing Leaflet Map with lots of Plugins and dependencies. Just adding the CartoDB.js does not work (I think there is a version conflict, but I am ...
0
votes
1answer
89 views

Leaflet - Load markers in the current map - dynamically

I am looking for a marker plugin for leaflet that allows loading of markers dynamically, according to the current view. E.g. I want to add OSM POIs to a world-wide map. Obviously loading all at once ...