Compare commits
No commits in common. "8dbfcc0ecec4af0b3f7cbfba4b91f1ee334864fe" and "e917bce40db70b4573f6ed7fcc25f325da3ef719" have entirely different histories.
8dbfcc0ece
...
e917bce40d
2 changed files with 14 additions and 20 deletions
|
|
@ -935,11 +935,12 @@ Ox.Map = function(options, self) {
|
|||
'raster-tiles': {
|
||||
'type': 'raster',
|
||||
'tiles': [
|
||||
'https://mt0.google.com/vt/lyrs=s&x={x}&y={y}&z={z}',
|
||||
'https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}',
|
||||
'https://mt2.google.com/vt/lyrs=s&x={x}&y={y}&z={z}',
|
||||
'https://mt3.google.com/vt/lyrs=s&x={x}&y={y}&z={z}',
|
||||
// FIXME: use protocol and make use of all subdomains
|
||||
//'https://{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}'
|
||||
'https://mt0.google.com/vt/lyrs=s&x={x}&y={y}&z={z}'
|
||||
|
||||
],
|
||||
'subdomains':['mt0','mt1','mt2','mt3'],
|
||||
'tileSize': 256,
|
||||
'attribution':
|
||||
'FIXME',
|
||||
|
|
@ -950,7 +951,6 @@ Ox.Map = function(options, self) {
|
|||
'id': 'simple-tiles',
|
||||
'type': 'raster',
|
||||
'source': 'raster-tiles',
|
||||
'roundZoom': true,
|
||||
'minzoom': 0,
|
||||
'maxzoom': 22
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,12 +43,12 @@ Ox.MapMarker = function(options) {
|
|||
that[key] = val;
|
||||
});
|
||||
setColor()
|
||||
setSize()
|
||||
const element = document.createElement('div')
|
||||
element.style.border = '2px solid black'
|
||||
element.style.borderRadius = '50px'
|
||||
element.style.backgroundColor = '#' + Ox.toHex(that.color)
|
||||
element.style.width = element.style.height = that.size + 'px'
|
||||
element.style.width = '16px'
|
||||
element.style.height = '16px'
|
||||
that.marker = new maplibregl.Marker({
|
||||
raiseOnDrag: false,
|
||||
shape: {coords: [8, 8, 8], type: 'circle'},
|
||||
|
|
@ -229,8 +229,13 @@ Ox.MapMarker = function(options) {
|
|||
}
|
||||
}
|
||||
|
||||
function setSize() {
|
||||
var size = that.map.options('markerSize');
|
||||
function setOptions() {
|
||||
// workaround to prevent marker from appearing twice
|
||||
// after setting draggable from true to false (google maps bug)
|
||||
var fix = false, // that.marker.getDraggable() && !that.place.editing,
|
||||
size = that.map.options('markerSize');
|
||||
//Ox.Log('Map', 'setOptions, that.map: ', that.map)
|
||||
setColor()
|
||||
if (size == 'auto') {
|
||||
that.size = 8;
|
||||
Ox.forEach(areaSize, function(size, area) {
|
||||
|
|
@ -245,16 +250,6 @@ Ox.MapMarker = function(options) {
|
|||
} else {
|
||||
that.size = size(that.place);
|
||||
}
|
||||
}
|
||||
|
||||
function setOptions() {
|
||||
// workaround to prevent marker from appearing twice
|
||||
// after setting draggable from true to false (google maps bug)
|
||||
var fix = false, // that.marker.getDraggable() && !that.place.editing,
|
||||
size = that.map.options('markerSize');
|
||||
//Ox.Log('Map', 'setOptions, that.map: ', that.map)
|
||||
setColor()
|
||||
setSize()
|
||||
/* fixme, some of those can be set some not
|
||||
that.marker.setOptions({
|
||||
// fixme: cursor remains pointer
|
||||
|
|
@ -271,7 +266,6 @@ Ox.MapMarker = function(options) {
|
|||
*/
|
||||
//that.marker._color = that.color;
|
||||
that.marker._element.style.cursor = that.place.editing ? 'move' : 'pointer';
|
||||
that.marker._element.height = that.marker._element.width = that.size + 'px'
|
||||
that.marker.setDraggable(that.place.editing);
|
||||
that.marker.setLngLat(that.place.center);
|
||||
if (fix) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue