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

learn more… | top users | synonyms (1)

1
vote
1answer
13 views

Make the Marker Appear For each Point

How can I make marker Icon appear for each point. I added the geoJSON with 65 points and have all been validated. However the icons appeared as a broken png. I proceeded to add a png I called in an ...
-1
votes
0answers
5 views

Routing in R using Leaflet

library(rCharts) library(shiny) runApp(list( ui = pageWithSidebar( headerPanel("Title"), sidebarPanel("MyApp" ), mainPanel( tabsetPanel( tabPanel("Interactive Map", ...
0
votes
0answers
6 views

Clear Cartodb.js layer of a Leaflet map

I'm getting problems to clear a Carto Layer. The aim of the function is to locate some closest points and repeat the operation removing the previous query. The query and the data receiving are working ...
1
vote
1answer
16 views

How to edit a WFS layer with leaflet draw

I have spend more than 4 hours trying to figure out how I can do this. I use Leaflet and Leaflet Draw in order to draw news features on my map. Now I want to be able to edit features of an existing ...
0
votes
1answer
13 views

Leaflet plugins - how to use two plugins together

I want to use two leaflet plugins: ExtraMarkers and IconLabel. How to combine them together? The result should be ExtraMarker with label. When I create ExtraMarkers: var icon = L....
1
vote
1answer
18 views

Generate a map image file from tiles and features

I am looking for a way to generate images (e.g. png) from a tile source with features added on top of the map, without user interaction or requiring a browser. Currently, I am able to create a ...
0
votes
0answers
13 views

Lock circleMarker size - Leaflet R

I am searching for a way to lock the size of the circle markers in Leaflet for R, addCircleMarkers(). I need the markers to retain the size they are relative to the polygon they are within upon ...
4
votes
2answers
44 views

How to edit an existing layer using leaflet?

I am used to working with OL3 and I wanted to try using leaflet and see if it is as powerful as OL. I loaded a map with some data from a GeoServer WFS layer using this tutorial from Georepublic. var ...
2
votes
0answers
26 views

how to efficiently detect intersect between polygons?

So I'm trying to implement box selection in leaflet. Currently i'm using turf's intersects function to detect if the box intersects with any of my geojson polygon features. However, this is very ...
0
votes
1answer
16 views

How to change info div based on baselayer selection?

I'd like to change the map logo in a info div based on the baselayer selection. For what I understood I have to use events but dunno how. Here is my code: <!-- Add LOGO --> var info = L....
0
votes
2answers
25 views

Add logo to a map using Leaflet/Mapbox

I am currently trying to learn how to use Leaflet / Mapbox (and JS, to some extent) by creating custom test maps. My problem is that I want to add a logo on the top of my map, with absolute ...
0
votes
0answers
16 views

Leaflet - Edit Feature Attributes in popup [closed]

I'm looking to make attributes shown in my click popup editable. I've been piecing together from Leafletjs and many search sources but have hit a wall. GitHub Index Here is a sample I've found which ...
0
votes
2answers
27 views

Pass Leaflet Draw Marker to Turf.js point

I am trying to dynamically supply turf.point([coordinate array]) with values from leaflet.draw markers. I can only find hard coded examples for all turf examples. I hope my goal is clear here. I ...
0
votes
0answers
28 views

Add user inputted markers to leaflet from mongodb

I want to allow users to input geojson points via a form then be able to get the points using an ajax call to display them on a leaflet map. I think I am messing up the ajax call which gets the data ...
0
votes
1answer
35 views

Passing values for a geojson filter in Leaflet

I have a situation where I have a geojson layer in leaflet and I want to create a subset of this layer as a separate geojson to highlight specific features. What I am doing right now is passing in ...
0
votes
1answer
26 views

Leaflet popups - preserving user input on close/reopen

I am working on a Leaflet map that allows a user to open a popup by clicking on a geometry and then generate dynamic content within the popup. However, I find that on closing and then reopening the ...
0
votes
0answers
5 views

dynamically upload maps on GeoServer [duplicate]

I want to write a webGIS that supports uploading Raster and Vector maps dynamically. When someone upload a map, it should dynamically upload on GeoServer. I develop based on leaflet library in ...
0
votes
1answer
26 views

Convert TIF to PNG for Leaflet map

I have a single-band, georeferenced .tif file that I would like to display on top of a Leaflet.js map, using the ImageOverlay function. Unfortunately, Leaflet seems only to accept PNG or JPG files, ...
1
vote
1answer
29 views

How to edit specific geometry on leaflet layer

I am starting working on a new, quite complicated functionality and I want to ask for some guidance regarding the way to implement it. The final aim is to give to the user the possibility to edit data ...
0
votes
1answer
58 views

Mapquest API & OpenLayers markers

Not unlike others, I've found myself forced to edit some code due to MapQuest changing how they offer the openstreetmap data, and using an API Key. Getting the key, aswell as getting up a simple ...
0
votes
0answers
12 views

How to extend Geocoder (Nominatim) with own/distinct address

I want to extend my Geocoder for my leaflet routing map. I am using leaflet routing machine and nominatim geocoder to implement routing and geocoder. Now my goal is: I want to put an a specific ...
0
votes
0answers
29 views

Leaflet route while dragging error with mapzen valhalla

I have added a router to my leaflet map and would like to enable the routeWhileDragging function. When I do this with the mapzen valhalla router I get the following error; lrm-mapzen.js:88 GET https:/...
0
votes
1answer
19 views

Using leaflet or google map to create layer of multiple attributes

I am creating a map with leaflet layer. Right now, each marker has three different attributes and I would like to create layers base on these three attributes (Model, group, and status). I am able to ...
0
votes
1answer
19 views

leaflet - change routing vehicle when clicked on button

I want to change the routing vehicle when clicked on a button. The default routing vehicle is "car" ("auto") when clicked a button routing vehicle should change to "foot" ("pedestrian"). I am using ...
0
votes
1answer
36 views

Can't load geoJSON files in Leaflet layer control

First of all, I have to sorry about my English. May not be perfect. I have a problem with show my geojson files into layer control. I read every topic about that on this side, i have tried on a milion ...
1
vote
2answers
39 views

How can I get a QGIS2Web project to display info for multiple layers in a popup?

I have built a project in QGIS and QGIS2 Web that has multiple polygon layers that overlap each other. I am trying to get the info pop up to display the data for all of the overlapping layers at a ...
2
votes
1answer
23 views

change width of outline for leaflet map depending on zoomlevel

I want to change the outline of a polygon depending on the zoomlevel. I thought it's easy to implement but there must be something wrong. My polygons dissapear when I try it with this code: to get ...
0
votes
1answer
10 views

White PNG pulled from mapserver stored in PGSQL using leaflet

I have a polygon layer stored as a table within PostGIS/PostgreSQL using SRID 3857. I have created a MapServer layer pointing to this layer. However, when I try to load this layer into Leaflet as a ...
0
votes
2answers
25 views

Geoserver WMS layer is hiding the basemap in a Leaflet map

When I add two layers to a Leaflet map (a basemap and a Geoserver WMS), the basemap disappers. But when its tiling, it can be seen for a moment. What's the problem? Maybe it's due to the transparency ...
0
votes
2answers
31 views

Leaflet Sidebar - set content depending on clicked GeoJSON feature

My goal is to set the content of the sidebar depending on what GeoJSON feature was clicked on. For example when clicked on polygon A the content of the sidebar is: "This is A" and when clicked on ...
1
vote
2answers
23 views

Remove Leaflet markers _leaflet_id

So I want to remove some markers that are created on a button click. If I use map.removeLayer() it removes the layer and also I set the array.length = 0, which resets the containing layer. However, if ...
1
vote
2answers
20 views

Add Leaflet layer based on variable with the same name?

I have a geojson layer named mapLayers and another geojson layer named lmiCounties, with a dropdown list with an item with the id lmiCounties. I want the second layer added to the first, which has ...
0
votes
0answers
22 views

Remove thumbnail of Qgis from wms,wfs layer

I have created one Qgis map server for serving map as wms or wfs feature. As i am adding the layers in QGIS various thumb nail of Qgis is coming which i donot want them to appear in my map. Same thing ...
0
votes
1answer
34 views

CartoDB- popup window not working

I am working on a project, and I have not worked with cartodb long, but there is something wrong with this code. It is supposed to display a little pop window showing the school district for that ...
3
votes
2answers
50 views

What is an appropriate tileLayer source for tiles served on an apache localhost through leaflet?

--I found a solution. Please, see answers below.-- I've been trying for about about 25 hours to get a working, locally hosted, tile server running, using this guide from switch2osm. I have a ...
1
vote
0answers
26 views

Leaflet Server Side rendering [duplicate]

A project I am working on contains 15 different layers with 5 containing over 50,000 polygons in each layer. Some of these layers must be "queryable" for data (ex: click to get more information of ...
0
votes
1answer
66 views

Leaflet Client Side rendering

A project I am working on contains 15 different layers with 5 containing over 50,000 polygons in each layer. Some of these layers must be "queryable" for data (ex: click to get more information of ...
0
votes
0answers
42 views

Mapzen Turn-by-Turn routing in Leaflet Routing Machine with costings: “multimodal”

I wanto to setup a routing service for my leaflet map. The Route should route over pedestrian, train or bus. Mapzen Turn-by-Turn Routing is exactly providing this by using the option: costing: "...
0
votes
1answer
47 views

Select one feature of multiple overlapping features (here polygons) on a Leaflet map

I have a map with multiple polygons rendered on it which can overlap eachother. I use leafletPip.pointInLayer(point, layer) from https://github.com/mapbox/leaflet-pip for determining which polygons do ...
1
vote
1answer
49 views

Load multiple GPX files to Leaflet map

Considering I have a folder that contains multiple .gpx tracks, my objective is to show each of them in a single leaflet map. Then I would personalize thing like tooltips of each track, the color for ...
0
votes
1answer
22 views

Highlighting or marking property using node id in leaflet?

I am working on openstreetmap using leaflet.js, I found some difficulties in highlighting a way(road) using it's node ID of OSM data. I need to know is it possible or not?
0
votes
1answer
38 views

How to update position of markers with “real time gps coordinants”?

I've got real time gps positions for a few cars and I want to create a map with updating markers. My code works but it doesn't "update" the markers, instead it adds new objects with new coordinates to ...
3
votes
0answers
45 views

Leaflet.Draw only edit GeoJSON

I am trying to enable editing of a GeoJSON layer in my Leaflet map using Leaflet Draw. I need to allow only a single edit at a time before saving the results back to the database. I tried to implement ...
1
vote
1answer
20 views

Leaflet - CRS.Simple custom scale?

I am displaying a gamemap using Leaflet. The map is nonwrapping. I use L.CRS.Simple which is recommended for this (and makes sense). I add multiple tilelayers, each created using gdal2tiles. The ...
-1
votes
0answers
11 views

How to apply levels to building using height?

I am using OSMBuilding classic 2.5D and leaflet versions, here i am not understanding how to apply levels to building using building height ? I have applied to geojson properties like "levels": 9, ...
0
votes
0answers
31 views

Write latlng array to gpx file

So I have this small application that stores some GPS values along a route as var position = [lat, lng, height] objects in an array. Now I would like to export this array as a .gpx file. I ...
0
votes
1answer
30 views

leaflet: javascript scope issue within geojson onEachFeature function

I'm new to javascript and even newer to Leaflet (version 0.7.7), so I'm having difficulty determining how to ask this question. With leaflet, when I click on a polygon, an ajax request is made, it ...
0
votes
1answer
40 views

Adding drop-down menu to leaflet map to update map/tiles to new location?

What I want to do is create an interactive choropleth map that has a dropdown menu of various countries so that the map updates when you click on that country. As an example, here's an interactive ...
1
vote
0answers
31 views

GeoJSON path using d3

I've been trying to make an animated path using d3, JSON, and a list of coordinates. This is the result in JSFiddle: http://jsfiddle.net/5m35J/92/ As you can see, there is a red dot in the corner, ...
0
votes
1answer
38 views

Animated GEOJSON path invisible in Leaflet

i have been trying to animate a path over a leaflet map using the following example from Mike Bostock: http://bl.ocks.org/zross/6a31f4ef9e778d94c204 After i make my own json and put it into code, i ...