Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

1 vote
1 answer
43 views

Get Coords from LeafletMouseEvent

I am trying to get coords from a leaflet map. I tried using e.latlng but it only returns the coords i initialized the map with. Not sure what's not working honestly. Here is my code: private map: L....
1 vote
2 answers
992 views

How to create the multiple leaflet maps on the page in angular

I have created the leaflet open street map given below. .component.ts map = L.map('map').setView([12.876, 80.599], 12); L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { ...
0 votes
2 answers
120 views

Issue with SCSS Styling in Leaflet Map with OpenStreetMap

Issue with SCSS Styling in Leaflet Map with OpenStreetMap I'm using OpenStreetMap and Leaflet to draw on a map. I have a function updateMarkers() that clears existing markers and creates new ones ...
0 votes
0 answers
175 views

Leaflet antpath error "Property 'antPath' does not exist on type"

I am doing a leaflet demo with angular 16. I have installed the leaflet package and it works perfectly but I can do the antpath polyline (The polyline works fine tho). Steps I've done: • npm install ...
0 votes
1 answer
370 views

Get data from geojson file based on current marker location

I need to superimpose polygons on leaflet map based on the data in the geojson file as I need to display custom location names for areas. This geojson file contains co-ordinates of polygon along with ...
0 votes
1 answer
1k views

Do I need to set up my own OSRM server while using OSRM leaflet-routing-machine to display coordinates saved on DB snapped to road?

Ok so in my angular app I am working on the frontend I have two dropdown in which I specify the city of departure and arrival and the backend uses an api that calculates the coordinates of this two ...
3 votes
0 answers
1k views

Display ECharts map using OpenStreetMap without Leaflet

I would like to render a geographical map inside my web page using the ECharts library. ECharts needs a third party service to retrieve the images of the geographical region that it must display and I ...
0 votes
1 answer
852 views

Get Leaflet map tile image for polygon

For a project I need to generate previews of polygons that we store in the backend. A polygon typically has this format: [lat,long] const polygon = [ [ 4.329064, 51.276626 ], ...
0 votes
1 answer
2k views

How to integrate offline maps in Ionic+Angular using leaflet maps?

this.map = leaflet.map("mapId", { zoomControl: false }).setView([17.385, 78.4867], 13); leaflet.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", { ...
0 votes
0 answers
275 views

How to include the leaflet map in angular formly with custom component

I have to create the leaflet map where I have used the angular formly . and I have created the custom component for leaflet map as leaflet.component.ts import { Component, OnInit } from '@angular/core'...
0 votes
0 answers
293 views

How to integrate the leaflet map in angular

I want to show the leaflet map in angular application As I have used the angular formly for application with tabs because In my application I have to create the dynamic forms In third tab I have to ...
1 vote
1 answer
1k views

set current Location marker

I worked through this tutorial and got it all up and running. Now I want to get my current browser Location and set a marker for it onMapReady. I am pretty new to programming and I'm just starting to ...
0 votes
1 answer
411 views

moving marker does not exist on type of import

moving marker does not exist on type of import please help me to solve this error. I have installed npm package npm install --save leaflet-moving-marker but it shows the error moving marker does not ...
0 votes
1 answer
435 views

Leaflet + Angular is it possible to draw semicircles?

In my angular application, I use maps through the ngx-leaflet library and openstreet maps. And now we need to draw semicircles. I know there is a Leaflet-semicircle extension, but I have already ...
1 vote
1 answer
1k views

Access Leaflet map in different component in Angular

I have a component, OpenStreetMapComponent, which views my whole map. In the same component I also have a number of buttons (zoom, current location...). Having all of that in one component soon makes ...

15 30 50 per page