Questions tagged [leaflet]

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

Filter by
Sorted by
Tagged with
1
vote
2answers
54 views

Leaflet MarkerCluster and Esri Leaflet Cluster - custom marker data from feature data not count of markers in the cluster

Is it possible to sum the data from the feature data in a esri feature layour to display on a clustermarker. The default value is the count of the markers contained in the cluster, but I want it to ...
2
votes
0answers
43 views

Leaflet.js custom coordinate system

Background: Display topographic plans of a specific size (1500 meters x 1500 meters). The source images of tiles can be of different sizes and resolutions. It is required to display on the plan some ...
1
vote
1answer
20 views

Duplicate markers in multiple layer groups not displaying

I have a map with a bunch of markers and some layer groups based on attributes for those markers. I made layer groups for each attribute and some markers appear in multiple layer groups. When I toggle ...
1
vote
2answers
1k views

Is there an editor for Leaflet JavaScript that has intellisense functionality?

Is there an editor for Leaflet JavaScript that has intellisense functionality? I've tried both Visual Studio 2015 and Visual Studio Code ... in 2015, if I type code like var geojsonlayer = L and ...
0
votes
1answer
23 views

Cannot load tiles from Mapbox using leaflet.js

I am a new user and I can't seem to get the tiles on the map. var mymap = L.map('mapid').setView([51.512, -0.104], 1); L.tileLayer('https://api.mapbox.com/styles/v1/mapbox/{mapbox.mapbox-streets-v8}/...
-1
votes
2answers
2k views

Set z-index of leaflet popup

I'd like to have my Leaflet popup (tooltip) such that it appears outside the bounding div of the map, rather than it being hidden once it hits the map border. I see zindex() as a tile layer method. ...
1
vote
1answer
123 views

refreshClusters on esri.Cluster.featureLayer

I am trying to 'refresh' a cluster layer which is created by L.esri.Cluster.featureLayer and a feature url. I have tried to remove and re-add the layer (with no succees). But the refreshClusters is ...
0
votes
1answer
145 views

What are Folium style_function parameters

I'm trying to do a uniform style for each polygon, but I want to know further about what I can do with Python library Folium Style_function. What can I put in the style variable? Where are the ...
1
vote
1answer
72 views

Select only the feature that overlapses its correspondant in another layer - Leaflet, qgis2web

I have 2 identical layers overlapping, each containing identical FeatureCollection values. Only one of them is added into the map. Is it possible that when clicking on a specific feature of the ...
0
votes
1answer
32 views

GeoJSON data disappears when using Marker cluster plugin [closed]

Here is the code I used to display my GeoJSON data on a leaflet map using HTML, CSS and JavaScript. Through the following code I wanted to load my point data on the map and form clusters of it using ...
0
votes
0answers
20 views

Disable map click when clicking on a polyline in Leaflet and vue2-leaflet

I defined addMarker and polylineClick functions. addMarker is called when clicking on the map and polylineClick is called when clicking on a polyline. But when I click on a polyline, map click event ...
1
vote
1answer
37 views

Cannot get transparent tiles when using gdal2tiles on a GeoTIFF

I have this GeoTIFF generated through UAV mapping. It has 4 bands: red, green, blue and alpha. I've been trying to use gdal2tiles to use this geotiff as a basemap on a Leaflet project. The thing is I ...
1
vote
1answer
951 views

Adding a position.watch and update feature to live map with leaflet.js?

I have an app working in node.js that locates a user and plots their location on a leaflet map. When others connect it shows them too. It keeps their marker live as long as they move the mouse. I ...
0
votes
2answers
1k views

360 degrees heading calculation between two points

I'm using Leaflet + Leaflet's rotate-branch to rotate my map application. map.setBearing(angle_deg); is the function to do so. angle_deg has to be between 0 and 359 to simulate any desired angle. I ...
6
votes
3answers
9k 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 ...
0
votes
2answers
426 views

Leaflet GeoJSON map legend

I am struggling with creation of the map legend adequate to my GeoJSON stylization. The code looks like below: var geojsonMarkerOptions = { radius: 8, fillColor: "#ff7800", color: "#000", weight: 1, ...
0
votes
1answer
48 views

Coordinate System Mismatch In Folium

I'm trying to get familiar with Folium library in Python. I wanted to make a web-map of Turkey. Framework uses EPSG:3857 Web Mercator CRS as default. I tried to use approximate coordinates at the ...
1
vote
0answers
28 views

Fitting tooltip completely inside a feature else removing it in Leaflet

I have been using tooltips as a form of labeling my polygons in Leaflet. The problem I'm not able to solve is to remove the labels from the view that doesn't fit completely inside the feature. ...
2
votes
1answer
4k views

Geoserver popups in Leaflet

I've got a simple Leaflet map with a basemap and one map-layer coming from my own hosted GeoServer. I made the layers show up nicely in a map. Now I want to add popups on the point layer showing ...
1
vote
2answers
451 views

Overriding default popup anchor in Leaflet GeoJSON polygon?

By default popups open wherever you click within the boundaries of polygons in Leaflet geojson layers. Here's an example: JsFiddle I would like to anchor the popup either: so it opens in a specific ...
2
votes
1answer
2k views

Combine multiple dynamic Leaflet filters [duplicate]

I'm very new to Leaflet and made a map using a GeoJSON Layer. I'd like to filter points from the GeoJSON Layer by a checkbox input. If I consider only one Parameter (Par1) with levels A, B and C I can ...
1
vote
0answers
45 views

Specifying legend location in folium

I have a few choropleth maps in one Leaflet map using folium. However, in my output, my legends all congregate underneath one another and on one side where it blocks the 'control zoom' icon. Is there ...
0
votes
1answer
195 views

Checking if a specific leaflet.draw control is enabled?

Where exactly are the leaflet controls stored that are added to the map? So at anytime in the app, I can check something like if(controls.polyline.enabled==true) My guess is its somewhere in the map....
0
votes
2answers
41 views

How to add TomTom's traffic flow map images to Leaflet? [closed]

I have a raster image from TomTom which shows traffic flow. The image is created after sending lat, long coordinates, that is one point to the GET serves with the zoom value, then I get the image ...
0
votes
0answers
46 views

Add custom text to Leaflet Draw button

Has anyone had luck adding text to a button in Leaflet Draw? I would like to add text next to the icons on the buttons I have, but there doesn't seem a way to specify that information in the ...
1
vote
0answers
50 views

How to send bbox dynamically via wms request in leaflet?

I've created a leaflet map and use L.tileLayer.wms to load my wms layer. I dont want to load all data on my map instead i need to load data based on bbox.I use this line for sending wms request to ...
0
votes
1answer
163 views

qgis2web open file

I am using the qgis2web plugin and everything works fine. I created few point objects in a shapefile layer on the map in QGIS. What I want now is to add the possibility to open a (Excel) file when I ...
0
votes
1answer
1k views

Leaflet marker popup link from outside of map dynamically

I am using Leaflet JavaScript library to show some earthquake informations. You can able to see few red circles on map. When you click that red circle it will display few details in popup. I want to ...
0
votes
0answers
35 views

Leaflet nested layer control

I'm trying to build an interactive game map with Leaflet and I would like to implement nested layer groups. I tried doing it the obvious way: putting some layer groups inside of a "master" layer group,...
0
votes
1answer
680 views

Creating layers depending on a property?

I have a .js file with coordinates for internships: var internships = [{ "features": [ {"type":"Feature","properties":{"category":"entretient","Name":"green"},"geometry":{"type":"Point","...
1
vote
2answers
1k views

Coloring circleMarkers based on category in Leaflet?

My question is, how can I get Leaflet to color each of circleMarkers I am generating/points with a different color, based off the type property of the point? I've done a bit of research, but all I've ...
3
votes
2answers
3k views

Intensity Wise Gradient is not working in leaflet.heat

I am using leaflet.heat for creating heatmap with leaflet API.I have a highest intensity of 1.0 and lowest 0.0. When I am drawing a heatmap in the highest zoom its all are showing the same color. I ...
3
votes
1answer
108 views

Accessing slope and aspect data using Leaflet?

I am building an application in leaflet, and I need to be able to access slope and aspect as a function of latitude and longitude. Currently I am able to get elevation data from the mapbox elevation ...
1
vote
0answers
27 views

Help spTransform CRS for use in leaflet

I am producing Kernal density estimates for animals from tracking data. Location is input at x y data, I produce a spatial polygons dataframe from these coordinates. xy<-id[c("X", "Y")] id<-id[...
1
vote
0answers
17 views

How can i save and load items in canvas format in leaflet?

I've created a leaflet map and added draw control. I can draw lines, polygons, and markers but I need to add a canvas and draw my favorite drawing items like this : I want to save these items and ...
0
votes
1answer
950 views

Custom functions for SAVE and CANCEL on Leaflet.draw edit control

I have added an edit control on my map which is working fine (On the Frontend); var editControls = new L.Control.Draw({ draw: false, edit: { featureGroup: this.updateGeomLyr ...
1
vote
1answer
231 views

Leaflet info box only showing properties from selected layer

I would like to use the info box as shown in the tutorial interactive choropleth map with multiple layers and properties from different layers. The idea is to only show the properties from the ...
0
votes
1answer
44 views

How to Use ST_MakeLine query in leaflet to connect to Carto

I want to run in leaflet a query that works in carto Builder to connect points in a line: SELECT ST_MakeLine(the_geom_webmercator) as the_geom_webmercator, min(cartodb_id) as cartodb_id FROM my_table ...
0
votes
1answer
89 views

Issue with using MultiLineString in Leaflet Animated Marker Plugin

This response on image below is coming from Geoserver as MultiLineString and I restructured it to LineString like on image because Animation plugin doesn`t support MultiPolyline json structure and ...
0
votes
2answers
230 views

Zoom to points using d3SvgOverlay

I have an application where a csv file is filtered and the filtered data is displayed on a leaflet map. What I would like to happen is for the map to zoom in to the points. I have tried using ...
1
vote
1answer
591 views

Showing all features by real-time API with Leaflet Map

I want to show all URL parameters or features onto a map. I have made the variable with ajax query as well as inside the loop data is printing with variable but I want to show this data with map into ...
0
votes
0answers
27 views

Django-leaflet: How to display geojson from database to django-leaflet

I am trying to map points from database on django-leaflet map using django-geojson package. I am able to access the data as url, but I am not able to display the points. I am baffled what could have ...
1
vote
1answer
922 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 ...
2
votes
1answer
545 views

Rendering OpenStreetMaps with GeoServer

My target is to have the whole planet to be available in the map client[leaflet.js/openlayers.js] but only a specific country loaded with roads etc. I have followed the steps below to setup my ...
0
votes
1answer
273 views

GeoDjango raster field display on Leaflet

In the new Django version support raster field and I follow this manual for GeoDjango raster field and this question for add raster I have built a simple demo. here the code : settings.py postgis ...
0
votes
1answer
361 views

Geting fitBounds and removeLayers to work in Leaflet

I am making a Leaflet map that gets its marker and popup information from a database. I have a dropdown that allows me to retrieve a subset of the entire database based on category. The drop-down and ...
1
vote
1answer
85 views

Dividing GeoJSON into two separate layers in Leaflet

Basing on this example: http://www.gistechsolutions.com/leaflet/DEMO/sports/sports.html I would like to do the same in my case, however, my way is slightly different: Firstly I have made a major ...
1
vote
1answer
524 views

Search box for GeoJSON in Leaflet

I have been struggling with adding a search box for GeoJSON stuff, similar to COntrol.geocoder in Leaflet. I used the advice under this post: Adding one search box for multiple GeoJSON polygon layers?...
1
vote
1answer
795 views

Leaflet-Search plugin error

I try to connect Leaflet search plugin to my map with GeoJSON data. But when I enter a search query in browser inspector I get error: layer.getBounds is not a function in leaflet-search.js. You can ...
1
vote
1answer
51 views

Leaflet (React-Leaflet) custom renderer

I am reposting a question that i asked in stackoverflow about leaflet and custom renderers. Basically what i want to achieve is create a custom renderer that alters the shape of CircleMarker or ...

1 2
3
4 5
66