An Open-Source JavaScript Library for Mobile-Friendly Interactive Maps
0
votes
0answers
30 views
How to store coordinates data from leaflet into database [on hold]
I want to retrieve coordinates from a map. When the user clicks on the map I want that location to be stored in a database. How can I do this?
I have like retrieve data from the map in the pop up ...
0
votes
1answer
12 views
Pan to features drawn from $getJson request in Leaflet
I am quite new to both javascript and php.
However, I am making a website with a leaflet map letting users find pubs in a certain area.
I created a funciton called draw(), which is called when ...
0
votes
1answer
27 views
Leaflet: How can I render my own tiles for intermediate (based on < 256x256 pixel tiles) zoom levels?
I use Leaflet for most work. Leaflet's default zoom levels use 256x256 pixel tiles. Often this does not allow me to focus nicely on regions, because I cannot set intermediate values in Leaflet's ...
1
vote
1answer
33 views
polygon popupContent did not get updated
I have a $.getJSON function, which gives me a list of polygons and multipolygons, I am binding popups to each polygon like this
[inside the polygon loop]:
var onEachFeature = function(...
3
votes
2answers
22 views
How to slow the zoom transition speed in Leaflet?
I'd like to slow the speed of the zoom transition in Leaflet, but I haven't figured out how.
I'm using map.setView() a few times to change the zoom level.
I've tried the solution suggested here:
...
0
votes
1answer
27 views
Leaflet: edit popupcontent
Im looking foward to create a mobile leaflet application to collect data.
First i use the L.locate-control plugin to get my current location:
L.control.locate({
strings: {
title: "current ...
1
vote
1answer
32 views
How to give color to polygon border in leaflet map
I am using geojson-vt for genreating polygon on leaflet map.polygon which is genreated is having some color...here i want to give different color to polygon border ...below is my geojson
{
"type": "...
1
vote
1answer
23 views
Giving Google API key in Google street map used by Leaflet map?
I using google map as tilelayer in leaflet and its working good but i know after free view ends google will stop displaying of its map
googleHybrid = L.tileLayer('http://{s}.google.com/vt/lyrs=...
1
vote
1answer
39 views
How Do I Add Custom “Region” labels with GeoJSON polygon style datapoints, similar to country names
I have a Simple CRS map I've set up in Leaflet, and I'd like to label portions of the map with just text labels, similarly to how on a typical World Map you'd see all the continents, then zooming in ...
3
votes
2answers
30 views
How do I change the style of points that were created with pointToLayer in Leaflet?
I'd like to change the style of certain points based on events, but I can't figure out how to do it.
Here's a working jsfiddle for an example.
var points = new L.geoJson(pointsData, {
pointToLayer:...
2
votes
1answer
30 views
Is it possible to only load Leaflet vector tiles at specific zoom levels?
I am "getting to know" Leaflet + TileStache, and wondering if there is a way to not have GeoJSON tile layers go back to the server on every single zoom level, but rather fetch every, say, 3 zoom ...
1
vote
1answer
11 views
Change cursor when hovering over features in WMS and ArcGIS tilelayers
I'm using Mapbox with Leaflet to retrieve WMS and ArcGIS tiles. I have added the ability to retrieve attributes from the WMS servers and ArcGIS servers with WMS capabilities turned on. I would like ...
1
vote
1answer
44 views
High performance markers on Leaflet map [on hold]
I'm using Leaflet to visualize a large number of points on a map. The points don't need to be very fancy, I just need to be able to set a radius (doesn't matter if it's pixels or meters, I just need ...
1
vote
1answer
28 views
gvsig raster image misplaced in leaflet, projection problem?
I am trying to show in leaflet a geotiff raster image that was generated in gvSig.
The basemap I am using in leaflet is a wms server with projection EPSG:3857.
Leaflet needs to know the upper right ...
2
votes
2answers
63 views
DivIcon vertical text
Iam struggling with one letter below the other vertical text orientation for DivIcon. Found some hints/hacks here https://davidwalsh.name/css-vertical-text
But i couldnt manage to get it working for ...
0
votes
2answers
30 views
Leaflet; linking text to geometries
How to connect a text in the website to a polygon on leaflet map?
(I am not refering to labeling - a simple html text)
Or a more advanced option: how to highlight this polygon when mouse is over the ...
3
votes
1answer
25 views
leaflet --> polyline with angle
Is it possible to draw polylines with one point (x,y) and given specific angles e.g. for 45 degrees, and given length?
In other words: without specifying the end point.
0
votes
1answer
24 views
Leaflet: resetStyle function doesn't work correctly
I made a map adapted from the leaflet tutorial for an interactive choropleth map. Highlight function is working correctly, but nothing happen when the mouse is out of a polygon: resetStyle doesn't ...
0
votes
0answers
23 views
Connect position data with accelerometer data plot
I have an app where i log position data and accelerometer data in daily activities.
My accelerometer data looks like this:
ID X Y Z norm(XYZ)-g TIMESTAMP ACTIVITY
1 0.670376479626 6....
1
vote
1answer
47 views
Popup with geojson data loaded using `Leaflet.FileLayer`
I'm trying to create an interactive map using the Leaflet.FileLayer plugin. This plugin allows me to load geojson files with description but I don't know how to show this description in Popup when ...
1
vote
1answer
29 views
Leaflet->how to draw a polygon with reference to another geographical position
I have a basic leaflet map in which I draw a circle representing a city.
Next, I would like to locate a rectangle with reference to that circle. (more specifically drawing a rectangle not with ...
0
votes
1answer
69 views
Custom marker and properties from geoJSON in Leaflet
I am having some issues with two things in a Leaflet map 1) custom marker 2) pulling attributes from a geoJSON file and putting it in the pop-up.
I should qualify things, I am really new to Leaflet ...
1
vote
1answer
15 views
Marker differently depending on the tool with Leaflet.Editable
I created a toolbar to add different markers with Leaflet.Editable (http://leaflet.github.io/Leaflet.Editable/example/index.html)
Is there a way to change the marker according to the tool used to add ...
2
votes
1answer
19 views
How can I get legend from Arcgis MapServer url
İs it possible to get legend item from arcgis mapserver or feature url. For example http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer
I can use ...
2
votes
1answer
19 views
Change the icon to a marker in Leaflet.Editable
I'm using Leaflet.Editable to add markers with different properties to a map.
Like: https://github.com/Leaflet/Leaflet.Editable/blob/master/example/index.html
How to customize the icon of the marker ...
0
votes
0answers
19 views
Limiting the number of layers a user can select - Leaflet and WMS
I have a map with around 20 WMS layers but I want the person exploring the map to only be able to have 3 layers active at a time. For my layer control I am using Styled Layer Control. What is the ...
2
votes
2answers
49 views
Leaflet circlemarker with shadow
I am often creating hex grid layers in Leaflet which use circlemarker for styling.
I would like to shift / offset the shadow circle under each marker in order to give the layer some depth.
Which ...
2
votes
2answers
22 views
Convert GIS DB PolygonField to WKT or GeoJson in Django
I am new to geoDjango.
I have a polygon field defined in the model like this:
my_poly = models.PolygonField(null=True, blank=True,
spatial_index=True, geography=True, srid=4326)
I am getting ...
0
votes
0answers
39 views
Printing leaflet popup with Geoserver Mapfish print
I have a leaflet map with some vector layers. Each polyline of my layers have a popup associated and on clicking on the layer, I can open a popup with some information about the layer.
For the moment,...
0
votes
1answer
27 views
Changing the line width/weight in Leafletr addPolylines function depending on an attribute
I would like to display flow lines (OD-lines) using leaflet in Shiny and sofar I can successfully map all the lines I want. But I also want to change the line width so that each line will have a ...
0
votes
1answer
39 views
Leaflet popup LatLong geocoder
I have a problem today with the Nominatim reverse geocoder for Leaflet.
I found a solution on github : https://github.com/perliedman/leaflet-control-geocoder , but I don't know how to use it.
I ...
2
votes
1answer
39 views
Leaflet get full extent of WMS layer [duplicate]
I need the bounds/full extent of a WMS layer in Leaflet. I don't think L.TileLayer.WMS has a getBounds() method. I had this issue with L.ImageOverlay, and added the functionality via:
L.ImageOverlay....
3
votes
1answer
25 views
How to detect when new markers have been added to the leaflet map?
May i ask how to I add a event listener to the map to detect when a marker has been added to the map?
In the docs, it says that we can use the "add" event, but how do I actually use it?
http://...
3
votes
1answer
41 views
How do I make custom icon in leaflet depending on attribute and after filter
I'm writting a leaflet webpage with inspiration from this:
http://labs.easyblog.it/maps/leaflet-panel-layers/examples/custom-item.html
I have my data from Geoserver (geojson) and it getting the ...
2
votes
1answer
66 views
Cannot get specific WMS to display in Leaflet or OpenLayers 3
I am trying to create a map in both Leaflet and OpenLayers 3 which displays the layer EMAP8 from the WMS http://wms.nlsc.gov.tw/wms. I can't get it to work. I can open the layer in QGIS, but when I ...
2
votes
0answers
34 views
How to use GeoJSON from Geoserver in Leaflet?
Is it possible to consume the GeoJSON from Geoserver as a 'dynamic' service in a Leaflet application?
So far I have only seen how to consume a static GeoJSON file.
Being able to construct GeoJSON ...
3
votes
3answers
128 views
Georeference a pdf without losing image quality
My recent project is to impelent a custom and georeferenced image to a leaflet map. I finisehd my custom map using inkscape now having a .svg and a .pdf vector data. As far as i know my next step ...
0
votes
1answer
31 views
leaflet map crs is 3857 but coordinates 4326
I am developing my first leaflet applications. So this is my trial application demo.
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
osm = L.tileLayer(osmUrl, {
...
2
votes
0answers
36 views
Interpolate line and locate point on line with Leaflet
I want to make a location tool in a leaflet web map.
In fact, I create a wep map application with Leaflet in which we can find those layers:
Bing aerial layer
POI = Points layer which contains ...
2
votes
1answer
25 views
Problem with flyTo and circleLocation
I made a leaflet map with a search control. The problem occurs when enabling circleLocation and flyTo: The circle gets drawn much too early and in the center of the current mapbound. When the map ...
0
votes
0answers
37 views
How to remove layer and redraw it again?
I am new to leaflet and I am using the following JavaScript code to draw the polygons in the map
var map = L.map('map').setView([], 10);
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}...
0
votes
1answer
37 views
Leaflet Custom TileLayer for ArcGIS Cache Tiles in Folder
This is ArcGIS Server tile cache folder structure on a server.
I need to get these tiles on my Leaflet map. I need to create a new TileLayer. I will extend existing TileLayer layer object's ...
0
votes
1answer
25 views
Leaflet popup does not work with esri rest feature services
I am writing a code that basically loads an arcgis service layer using leaflet.The code does as below:
Loads POINT layer from esri rest feature server and Categorizes
points based on attribute named ...
1
vote
0answers
32 views
R / Leaflet obtain clicked coordinates
I have a fairly simple leaflet project in RStudio
library(rgdal)
library(leaflet)
library(htmlwidgets)
#load data/layers
m = leaflet() %>% {add polygons....}
saveWidget(m, file="HTML_File.html", ...
3
votes
1answer
25 views
In Leaflet style function, option to prevent display completely?
In a Leaflet style function, is there an option which completely prevents the display of a feature? In other words (pseudocode):
function styleFunc(feature) {
if (feature.properties['blah'] == 1) ...
1
vote
0answers
18 views
Hide/Show Leaflet Routing Machine when click on button (Easy Button plugin) [closed]
I tried to put this code :
var rlayer = null;
L.easyButton('fa-level-up',
function() {
if(rlayer) {
map.removeLayer(rlayer);
rlayer = null;
} else {
var routing = L.Routing.control(...);
...
0
votes
0answers
27 views
How to correctly use google maps static tiles with leaflet
I am trying to use tiles generated with the google static api with Leaflet and I am facing issues because the generated tile seems to be displayed "off-centred".
My original question has been posted ...
0
votes
0answers
20 views
Small features don't draw when zoomed out using Geoserver WMS
I am using Leaflet to access polygon layers through Geoserver WMS. When I zoom out the smallest polygons will disappear and not draw. They would essentially be a dot if they did draw. Is there a way ...
1
vote
1answer
39 views
Problem with map tiles loading with Leaflet and Bootstrap
I want to create website with Leaflet map placed in bootstap tab. If I switch into tab where is Leaflet instantion tiles are not loading correct(I see the grey background). I guess there is a problem ...
0
votes
0answers
49 views
MapFish Print - Geoserver module: client spec parameters ignored
I want to print a map in Leaflet using the Geoserver Print Module, built on Mapfish. I configured the .yaml file and I am specifying the parameters to be used in the request as below:
var ...