1
0
Fork 0
forked from 0x2620/oxjs

migrate to maplibre-gl for maps

This commit is contained in:
j 2025-08-05 18:50:06 +02:00
commit 8cebad9fb4
7 changed files with 605 additions and 234 deletions

View file

@ -50,12 +50,10 @@ Ox.MapMarkerImage = (function() {
c.context.strokeStyle = 'rgba(' + border.join(', ') + ')';
c.context.arc(r, r, r - 1, 0, 360);
c.context.stroke();
cache[index] = new google.maps.MarkerImage(
c.canvas.toDataURL(),
new google.maps.Size(options.size, options.size),
new google.maps.Point(0, 0),
new google.maps.Point(r, r)
);
cache[index] = document.createElement('img')
cache[index].src = c.canvas.toDataURL()
cache[index].width = options.size
cache[index].height = options.size
}
return cache[index];