All Questions
Tagged with leaflet google-maps-markers
33
questions
57
votes
5
answers
59k
views
Large dataset of markers or dots in Leaflet [closed]
I want to render about 10.000 markers or dots on a leaflet map. I already did it the regular way and I found it is way slower compared to Google Maps. I'm looking for a way to render multiple elements ...
45
votes
8
answers
87k
views
custom marker icon with react-leaflet
I tried everything I found on the web, Stackoverflow and Github, and I still can't make it.
I want to make a custom marker with a custom icon, but with my code below I always got an error : '...
15
votes
1
answer
37k
views
leaflet.js - Set marker on click, update position on drag
for a small project I am working on, I need to be able to place a marker on a leaflet.js powered image-map and update the position of this marker, if it gets dragged. I use the following code to try ...
7
votes
1
answer
6k
views
Leaflet - How to match marker and polyline on drag and drop
I have a project with leafletJS.
For example, I have 2 points (A, B) in map. I display it as 2 Markers
I must draw a polyline from A to B.
I moved marker A and I want to the head of polyline of marker ...
4
votes
3
answers
11k
views
How to add text below a marker in leaflet?
I created some markers on leaflet map but the only problem is that i dont know how to add a text below each marker and im not talking about popups. What I mean is that the text below the marker has to ...
19
votes
5
answers
38k
views
Rotate marker in Leaflet
How can I rotate a marker in leaflet? I will have a lot of markers, all with a rotation angle.
I've tried this solution from runanet/coomsie at Leaflet on GitHub, but nothing happens with my marker:
...
3
votes
2
answers
8k
views
Getting the count of markers in a layer in leaflet
I have a Leaflet map with a layer called flickrpics that is loaded dynamically in geojson based on the bbox of the current map view. I would like to get a simple count of the number of markers in that ...
2
votes
1
answer
4k
views
Trouble using Leafletjs MarkerClusterGroup and filters with Mapbox
I've tried Mapbox and their API to create an interactive map. The purpose is to fetch points in a geojson file, and display them on the map.
They have to be filtered by their marker-icon and grouped ...
1
vote
1
answer
4k
views
Get center of geojson Continent/Country/State with leaflet
Is there a way of finding a center for countries/continents which consist of more than one polygon object(ex. USA, Canada, which have an islands besides main land part)? I was trying to use leaflet's ...
-1
votes
1
answer
7k
views
Leaflet filter markers by name using checkbox
I want to filter my markers by name, using map.addLayer(nameOfTheMarker) and map.remvoeLayer(nameOfTheLayer) with a checkbox like this:
$('#markertoggle').change(function () {
if (!this.checked)
...
68
votes
1
answer
53k
views
Leaflet.js center the map on a group of markers
I'm using Leaflet.js and would like some way to centre the map on the markers I have so that all are within the user's view when the page launches. If all the markers are clustered in a small area, I ...
8
votes
2
answers
3k
views
Leaflet.label not showing over the markers
I am having a set of geoJSON points and they have corresponding labels attached to them.
var points = L.geoJson (null, {
onEachFeature: function (feature, layer) {
layer.options....
8
votes
2
answers
21k
views
Leaflet custom marker icon scale to zoom
I use Leaflet to draw an OpenStreetMap and attach it with a custom icon marker
var mymap = L.map('mapid').setView([x, y], 13);
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?...
7
votes
1
answer
7k
views
Leaflet custom icon resize on zoom. Performance icon vs divicon
I was trying to resize my custom icons when zooming in leaflet. I came up with two solutions for this. One using the L.Icon tag, the other one using L.divIcon. In both examples I only set 1 marker and ...
7
votes
1
answer
20k
views
How to make markers in Leaflet blinking
Is there a simple way to make a marker in Leaflet map blinking ? I mean animated blinking - something like a loop of transition from opacity 1.0 to opacity 0.5 in 1 second and then reverse, end of ...