I have a leaflet map which is currently pulling in API data from Geonames and Open Weather through AJAX/cURL routines. There is a select bar being populated with country names through use of a large geo.json file with country names and iso codes. The value of the country in the select field is being used ..
Category : leaflet
I’m trying to add a marker cluster to my map, however, I keep getting the error: Uncaught TypeError: Cannot read property ‘trim’. It says that the error comes from ‘var markers = L.markerClusterGroup();’ I’m not too sure how to fix it as I installed the latest leaflet, leaflet easy button and leaflet marker cluster and ..
I try to center a map on the active marker with Leaflet (version 1.7.1). For that, when I create a marker, I add an event: function addMarkerTomap(map) { … var result = L.marker(lat,lng],{icon:myIcon}.addTo(map).on(`click’, centerMap); … } Note that map is a parameter, not a global variable. Now I define the centerMap function: function centerMap(e) { ..
I am creating a leaflet map with popup d3 barplots that are tied to specific geographic points. I am using this code to create the leaflet popups (but with my own data): http://bl.ocks.org/Andrew-Reid/11602fac1ea66c2a6d7f78067b2deddb I want to be able to add a fixed horizontal line (which will represent a threshold in that data), something like this. ..
I have seen the Leaflet.Draw Demo, how to save data in geojson format. Next, I want to find out how to import the data again. Either by a button-click or automatically. I didn’t find examples in the documentation. Is there anything that’s inbuilt in Leaflet.Draw, or a plugin library? <body> <div id="map"></div> <div id="delete">Wis alles</div> ..
I’m using Leaflet to insert a map into Qualtrics. For one of my markers, I have it set up so that (1) a popup appears with a mouse hover and (2) clicking on the popup continues on to the next page in the experiment: marker1.on(‘mouseover’, function (e) { this.openPopup(); this.getPopup()._contentNode.onclick = function () { document.querySelector("#NextButton").click(); ..
Now I making Laravel application with Leaflet and Mapbox.(PHP and JS is better to use) But I have been faced problem that how to evaluate whether the points belong to a route or not. So I have been learning about some geo solution, but I don’t know what is correct vernacular to search and correcting ..
This code is part of a program that takes in addresses that a user enters in a search bar and tries to find them on a map. Here is a link to the site. createSQL: function() { var address = $("#search-address").val(); SearchableMapLib.currentResults = JSON.parse(JSON.stringify(SearchableMapLib.geojsonData)); if(SearchableMapLib.currentPinpoint != null && address != ”) { var point = ..
image1 image2 I use SVGOverlay to place a svg element in react leaflet map. However, the element is not fully displayed unless I zoom in much. What I want to do here actually is that when I click a specific point, I would visualize the svg image fully, without the need of a zoom. Here ..
This is the message I am getting using a Leaflet.js heatmap, and I can’t see my circle markers, and I believe this is most likely the issue. Because a cookie’s SameSite attribute was not set or is invalid, it defaults to SameSite=Lax, which prevents the cookie from being sent in a cross-site request. This behavior ..
Recent Comments