You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I tried to use imageOverlay() instead of tileLayer() and my markers became invisible. However, if I click on the area where my marker point should be I get a click and a pop properly. Here is the code that I am using:
var map = L.map('map', {
crs: L.CRS.Simple
}).setView( [70, 120], 1);
var bounds = [[-26.5,-25], [1021.5,1023]];
var image = L.imageOverlay('uqm_map_full.png', bounds).addTo(map);
map.fitBounds(bounds);
map.setView( [70, 120], 1);
glify.points({
map,
size: (i) => {
return 20;
},
color: () => {
return {
r: 1,
g: 0,
b: 0,
};
},
click: (e, point) => {
//set up a standalone popup (use a popup as a layer)
L.popup()
.setLatLng(point)
.setContent('You clicked the point at longitude:' + point[glify.longitudeKey] + ', latitude:' + point[glify.latitudeKey])
.openOn(map);
console.log(point);
},
data: [[145,175.2]]
})
Any ideas or suggestions would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
amantalion
changed the title
Markers are invisible if used with imageOverlay
Markers are invisible if imageOverlay is used
Mar 20, 2021
Hi, I tried to use
imageOverlay()
instead oftileLayer()
and my markers became invisible. However, if I click on the area where my marker point should be I get a click and a pop properly. Here is the code that I am using:Any ideas or suggestions would be greatly appreciated.
The text was updated successfully, but these errors were encountered: