Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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

0
votes
0answers
13 views

Is there a way to only render a certain area of the map?

I'm trying to make a lost/found web app which involves displaying my school's map. I think it's unnecessary to render the rest of the surrounding locations as it requires more bandwidth. Is there any ...
0
votes
0answers
17 views

leaflet display geoJson just a like a line

I am trying to construct a choropleth map with leaflet, when I execute the script, just a line is displayed. What can be wrong? <!DOCTYPE html> <html> <head> <meta ...
0
votes
0answers
21 views

Vector Tiles VS Raster Tiles for leaflet

I have downloaded many vector tiles in the mbtiles format from OpenMapTiles. The reason I did that is because I will be using them on a station that cannot have an internet connection at all. I would ...
0
votes
0answers
43 views

Indoor Map for Office building [on hold]

Im looking to create an indoor map where user can see all the building The best option that I found is leaflet, the thing is I don't find any resource explaining how to create my own map. How could ...
0
votes
0answers
8 views

Adding custom icons to L.markerClusterGroup?

I am new to leaflet and javascript and would like to add custom icons to the code below but am not sure where exactly to put the code and what stuff to move around... I am looking at the Leaflet....
2
votes
1answer
37 views

From SWEREF99 to EPSG:3857

I have a huge dataset of coordinates referenced with the SWEREF99 coordinate system. Now I would like to convert all these coordinates (and other data as well) to a coordinate system that can be ...
0
votes
0answers
11 views

leaflet directive paths are not working on md-dialog

I tried to make a dialog with leaflet directive and show on him an image. everything is working well except the part of paths. I tried to make a path between two markers. but the element is not shown ...
0
votes
1answer
13 views

Carto.JS - Pop up closes when mouse hovers out of feature

As per the CARTO docs I am using the following code to trigger a info pop up when the user's mouse hovers over a feature: const popup = L.popup({ closeButton: false }); ecosystem.on(carto.layer....
0
votes
1answer
16 views

Is there a way to install leaflet search plugin without using npm?

I am not familiar with Node.js or npm at all, but my IT has told me node.js/npm is not compatible with our IIS, and the only search plugins to add on to leaflet are using npm to install them. I did a ...
0
votes
1answer
33 views

How can I stop 'drag' moving my whole map in Leaflet.

I have a leaflet map, containing a tileLayer, and a layerGroup In the layerGroup, I plot circleMarkers, and then connect them with a polyline. Though the markers are defined as draggable, I get no ...
0
votes
0answers
41 views

Save and retrieve Leaflet drawings through GeoServer and PostGIS [on hold]

I am following the below pipeline architecture flow to achieve a GIS based application problem. PostGIS - GeoServer - Leaflet/OpenLayer. I have set up my leaflet client application which composes ...
0
votes
1answer
31 views

How can I create 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","...
0
votes
1answer
32 views

How to implement a temperature map using leaflet/openlayers?

I am new on Leaflet/OpenLayers. I have been searching the internet for a way to create a temperature map like the one below, but I didn't succeed...the only thing I made was a classical heatmap, but ...
1
vote
0answers
11 views

more than one reactive events to subset markers in Leaflet in R

I am trying to create a shiny ap in R that displays markers on a map. I have a couple of categories that I would like to subset. Currently, I can subset but the map is only reactive on a single input (...
0
votes
1answer
17 views

Leaflet search and popup at other position

In leaflet I want the popup on another position then the standard. So I created a div in which the popup-information is opens. countryLayer = L.geoJson(countryLayer, { onEachFeature: ...
0
votes
1answer
35 views

Setting “Map View” instead of “Split View” in Leaflet javascript

I am using geojson-dashboard framework template for Leaflet (http://fulcrumapp.github.io/geojson-dashboard/). By default, the initial view of the screen is "splitted" or "divided" (half view is the ...
0
votes
1answer
19 views

leaflet - divicon - How to hide the default square shadow?

For example, I write this: L.marker([lat, long], {icon: L.divIcon({html:"China"})}).addTo(map); I checked the documentation: By default, it has a 'leaflet-div-icon' CSS class and is styled as a ...
0
votes
0answers
21 views

Close popup and infowindow when clicking closeButton on popup using carto.js v4

When a user clicks a marker on my map two items open, a popup and a related infowindow (the infowindow being absolutely positioned to the top right of the map). I want to get both items to close when ...
0
votes
0answers
13 views

Getting geoJSON feature collection properties to display in a submit form inside a marker popup

I am new to programming. I am creating a location based quiz and am stuck trying to get the data from a geoJSON feature collection (served from a database) to show in a form inside a leaflet marker ...
0
votes
0answers
30 views

Leaflet zoom level accuracy

I'm analysing XY data derived from a 'clickable' online map used by the public to register sightings of a type of shark. Unfortunately users were able to log locations regardless of zoom level which ...
0
votes
1answer
48 views

Choropleth map from voronoi map from a set of coordinates (d3+leaflet)

I have a csv file with a set of coordinates with the following structure: id,name,latitude,longitude (24 values). Those 24 points represent coordinates in a city. I would like to get a voronoi map ...
1
vote
1answer
24 views

Display overlapping polyline segments as multiple lines with offsets?

Selecting which polyline is displayed on top in case of segment overlaps seems to be quite a FAQ, however, I would like to find a way to display overlapping polyline segments side-by-side, i.e. as ...
1
vote
1answer
145 views

leaflet search control not showing up in geodjango app

I have a very basic geodjango app and I am trying to enable search control on it. I have found this question Adding a search box to a Leaflet.js example and the link brought me to what it seems like ...
0
votes
1answer
35 views

images URL “Geojson-dashboard” framework for Leaflet js

a question for somebody that used before the Geojson-dashboard framework for Leaflet (https://github.com/fulcrumapp/geojson-dashboard): Is it possible to add the images URL or Hyperlink dynamically? ...
0
votes
0answers
19 views

Far East Russia Detachment [duplicate]

I'm using Leaflet JS with a modified GeoJSON file of world contries to display a choropleth, like this: Is there any way to display the far-eastern part of Russia as a contiguous entity? Rather than ...
0
votes
0answers
22 views

leaflet rastercoords how to change the map coordinates

I am trying to use leaflet-rastercoords library to make an interactive map. Now everything is running well but I need to change the starting point of the image so that when I call project or unproject ...
0
votes
0answers
26 views

Visualizing OSMNX node colors (by walking distance) in a Leaflet Web Map

I am attempting to display something like this example in a Leaflet web map. This web map will exist in a Flask-created user interface. So far I can get OSMNX networks to show up by themselves (with ...
2
votes
0answers
22 views

Save Mapbox-Vector-Tiles (PBF) on indexeddb and use them offline

I'm developing a PWA(Progressive web app) where I need to retrieve PBF files from a POSTGIS database, then save them on an offline layer, to work as a offline-first app, right now I'm using a ...
0
votes
1answer
55 views

Leaflet not pulling in unique GeoJSON attributes

I am building an app in Leaflet where a user can click on a GeoJSON feature and it will show the unique value of the feature in the popup. The attributes shown are each in an input box so that the ...
0
votes
1answer
58 views

Leaflet address search/geocoding

First off I am pretty new to coding so apologies for the newby questions. Basically I have been using Leaflet to create an interactive map, I have managed to pull in some data from a PostGIS ...
1
vote
0answers
40 views

obfuscate real coordinates

Due to copyrights I cannot deliver some POIs as plain vector data using GeoJSON in Leaflet or OpenLayers. I'm therefor looking for some kind of sane obfuscation, to make it harder for normal users to ...
0
votes
1answer
27 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 build a simple demo. here the code : settings.py postgis ...
0
votes
1answer
41 views

Entering manual coordinates to draw polygon in Leaflet?

I want the user to enter manual coordinates of a polygon and then to click on a button to draw the polygon. My code: <body> <div> Polygon: <input type="text" name="...
0
votes
0answers
18 views

Leaflet Popup Icon arrow not in the right place

So I working on my map website and I want to get the coordinates in a place. When I applied this code: var popup = L.popup(); function onMapClick(e) { popup.setLatLng(e.latlng).setContent(" " + ...
0
votes
0answers
37 views

Dynamically created content in Leaflet popup using jQuery

I am trying to make a dynamically created dropdown list to submit user content from a Leaflet popup (each popup contains a different list based on condition). However, I somehow don't manage to clear ...
0
votes
1answer
29 views

Higher than maxNativeZoom requests tiles

Leafet is requesting tiles while at a higher zoom level than maxNativeZoom from defined mapserver instead of just stretching the maxzoom sized tiles. It is creating a lot of 404s since my maxzoom is ...
1
vote
0answers
27 views

GeoServer - labels not working correctly

Currently having a few issues with GeoServer not displaying our labels correctly. The code in question is here: <Fill> <CssParameter name="fill"> <ogc:Literal>#...
0
votes
2answers
48 views

CARTO.js / ReactJS: Showing and hiding layers on toggle

I have a the following layer: class DataLayer extends Component { static contextTypes = { map: PropTypes.object, // Leaflet map }; componentDidMount() { const { client } = this.props; ...
1
vote
2answers
44 views

Get variable from eachfeature function to php?

I have get the variable from onEachFeature function and set on a HTML tag, like this function onEachFeature(feature, layer) { layer.bindPopup(feature.properties.TenCty); layer.on("click", ...
0
votes
0answers
12 views

Getting static .pngs from mbtiles file or other sources

My nomenclature may be astray because mapping and GIS is not my domain. We need to be able to serve tiles locally in a structure lik the folder example provided here: https://www.maptiler.com/how-to/...
1
vote
1answer
31 views

Toggling Leaflet map on click?

I have created a leaflet map in my web page and I would like to show/hide it when I click on a button. I want that first, when I load the page, the map is not visible. HTML code: <div class="...
0
votes
1answer
42 views

Open source public transit directions

I am planning on hosting a map server to serve out directions to my webapp. I need to be able to give public transit directions, time estimate using said public transit, and also offer search for ...
0
votes
2answers
44 views

leaflet change attribution prefix on baselayer change

In leaflet is there a way to change the attribution prefix when a specific baselayer change happens using the default layer control?
0
votes
0answers
13 views

Open multiple popups in a cluster without them overlapping

When clicking on a cluster at a specific zoom level, the cluster should open multiple popups. I most of this done, so when clicking on the cluster all the popups from that cluster open, but they are ...
2
votes
1answer
73 views

How to use custom icons for Leaflet Layer groups

Ok, I have searched posts and tutorials and could not find the answer to my specific application of this feature Almost all the examples use L.marker to simply place a marker on the map using various ...
2
votes
1answer
25 views

Filtering GeoJSONs data using Selects values

I have a bus network with 2 GeoJSONs : one for stations (points) and the other for lines between them. I have 3 selects :first one to select the bus line and filter the stations on the other two that ...
0
votes
0answers
19 views

enablePermanentHighlight in esri Feature Layer

let marker = L.marker(new L.LatLng(lat, lon), { icon: markerIcon }); map.addLayer(marker); Just like the normal marker, how can we use enablePermanentHighlight() on features of FeatureLayer. Any ...
0
votes
1answer
39 views

Getting width of road segment given its end points using Leaflet?

I want to highlight a road segment on a Leaflet Map. I have the coordinates of the end point of the road segment, so could plot it as a linestring. But the problem is how can I get the width of the ...
1
vote
1answer
17 views

Generate tiles from leaflet polygons

I have a set of shapes drawn in Leaflet (using Leaflet.draw). I need to rasterize these into a tileset and export it because I need to use the images elsewhere. My initial idea was to go through ...
0
votes
1answer
38 views

Leaflet - Creating lines to connect GeoJSON points

How do I create lines connecting GeoJSON point features with the same "ligne" data following a given order (Id for exemple). This is what my GeoJSON looks like : { "type": "FeatureCollection", "name"...