Leaflet is a modern, lightweight open-source JavaScript library for mobile-friendly interactive maps.
0
votes
0answers
3 views
Leaflet path: how can I set a css class?
Well the title says it all but here is some code so you see what i mean.
function eachFeature(feature, layer) {
layer.on({
mouseover: highlightFeature,
mouseout: ...
0
votes
0answers
3 views
Meteor with leaflet killing my browser
I'm trying to build a reactive map with Meteor and leaflet to show some site visitors. Everything works fine up to a point (about 30 mins of leaving the browser open) when the map stop being so ...
0
votes
0answers
18 views
Leaflet.js & Mapbox.js - Uncaught TypeError: Object [object Object] has no method 'on'
I'm using Mapbox, which is based on Leaflet.js to generate my maps. I'm trying to add a layer group to my map. But every time I call .addTo(map), I get
Uncaught TypeError: Object [object Object] has ...
0
votes
1answer
44 views
Why is the 'click' event not fired when the shift key is pressed?
I'm trying to understand how the events are implemented in leaflet, and I have difficulties understanding how it works.
Here is a map made with leaflet (comes form a standard tutorial on the leaflet ...
0
votes
2answers
12 views
ImageOverlay and Rectangle Z index issue
I have a function that adds an imageOverlay and a semitransparent Rectangle on top of that image (so as to tint the image, and draw a keyline around it).
activeUserImage = new ...
0
votes
1answer
29 views
Generate custom marker (icon) out of two images in Leaflet
In Javascript, using Leaflet to display a map, I would like to have custom markers out of a two custom images :
I want to have a "background" image with a color (or shape) to identify the category
...
0
votes
1answer
13 views
Leaflet Multipolygon custom popup
I have an OSM map and I'm using leafletjs.
I have created my custom popup for marker. It it works fine and correctly.
marker.bindPopup(strMsg,{className: 'myPopup'});
This code works perfectly.
...
0
votes
0answers
48 views
Javascript Pushing to an Array crashes browser [closed]
Good day. I have been trying to improve my navigation application, but I am new to Javascript. With your help I have managed to get take the coordiantes I have from the algorithm and input them on the ...
0
votes
0answers
24 views
Leaflet JS Map: Driving Route with Multiple WayPoints (10+)
The thing I am stuck with is figuring out a way how to draw a driving route with multiple markers (waypoints) with Leaflet JS Maps.
I want to achieve visually something like this: ...
0
votes
1answer
37 views
Clustering markers on mapbox / leaflet
I'm trying to set up a clustered map on mapbox, like http://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld.388.html
But their example uses a plain .js file as data
...
0
votes
1answer
28 views
How to create a pin on a lefleat map from geolocation?
I have created a map using LeafleatJS and want to create a pin on my map to indicate where the user is. I've tried code below:
L.marker(e.latlng).addTo(map)
.bindPopup("Me").openPopup();
What ...
0
votes
1answer
17 views
geojson circles, supported or not?
When I look up the specs of GeoJson I see that circles are supported:
http://geopriv.dreamhosters.com/geojson/geojson-spec.html#circleExample
When I try out the code in geojsonlint ...
2
votes
2answers
39 views
Integrating Leaflet and Bootstrap: help refactoring my css
I'm trying to use Bootstrap to structure a page containing a leaflet map.
Here is how it looks like:
I've been unable to do it with bootstrap.
I wrote some ugly css which barely works:
HTML
...
1
vote
0answers
30 views
geofence:: show alert when object enters or exits from geofence?
if (is_in_polygon($points_polygon, $vertices_x, $vertices_y, $longitude, $latitude)){
echo "<b>object enters polygon</b>";echo "<br>";
break;
}
I am ...
0
votes
1answer
21 views
Leaflet - GeoJSON - co-ordinates
I am trying to use GEOJSON along with leaflet and am attempting to display a linestring between two locations , by dynamically entering their coordinates in the geoJSON feature
var geojsonFeature = { ...