Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/circle/GoogleMapCircleOverlayRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import {
AbstractCircleOverlayRenderer,
type CircleEntity,
type CircleState,
overlayStackZ,
} from '@mapconductor/js-sdk-core';
import { GoogleMapActualCircle } from '../GoogleMapTypeAlias';
import { GoogleMapViewHolder } from '../GoogleMapViewHolder';
import { loadLibrary } from '../LibraryLoader';
import { buildCirclePath, calculateCircleZIndex } from '../overlay3d';
import { buildCirclePath } from '../overlay3d';

export class GoogleMapCircleOverlayRenderer extends AbstractCircleOverlayRenderer<
GoogleMapViewHolder,
Expand All @@ -26,7 +27,7 @@ export class GoogleMapCircleOverlayRenderer extends AbstractCircleOverlayRendere
strokeWidth: state.strokeWidth,
fillColor: state.fillColor,
geodesic: state.geodesic,
zIndex: state.zIndex ?? calculateCircleZIndex(state.center),
zIndex: overlayStackZ('circle', state.zIndex),
altitudeMode: AltitudeMode.CLAMP_TO_GROUND,
});
this.holder.map.append(circle);
Expand All @@ -47,7 +48,7 @@ export class GoogleMapCircleOverlayRenderer extends AbstractCircleOverlayRendere
circle.strokeWidth = current.state.strokeWidth;
circle.fillColor = current.state.fillColor;
circle.geodesic = current.state.geodesic;
circle.zIndex = current.state.zIndex ?? calculateCircleZIndex(current.state.center);
circle.zIndex = overlayStackZ('circle', current.state.zIndex);
return circle;
}

Expand Down
5 changes: 3 additions & 2 deletions src/circle/GoogleMapCircleOverlayRenderer2D.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
closeRing,
type CircleEntity,
type CircleState,
overlayStackZ,
} from '@mapconductor/js-sdk-core';
import { toGoogleMapFillStyle } from '../color';
import { geoPointToLatLng } from '../helpers';
Expand Down Expand Up @@ -32,7 +33,7 @@ export class GoogleMapCircleOverlayRenderer2D extends AbstractCircleOverlayRende
strokeWeight: state.strokeWidth,
fillColor: fill.color,
fillOpacity: fill.opacity,
zIndex: state.zIndex,
zIndex: overlayStackZ('circle', state.zIndex),
clickable: state.clickable,
map: this.holder.map,
});
Expand All @@ -54,7 +55,7 @@ export class GoogleMapCircleOverlayRenderer2D extends AbstractCircleOverlayRende
strokeWeight: current.state.strokeWidth,
fillColor: fill.color,
fillOpacity: fill.opacity,
zIndex: current.state.zIndex,
zIndex: overlayStackZ('circle', current.state.zIndex),
clickable: current.state.clickable,
map: this.holder.map,
});
Expand Down
5 changes: 3 additions & 2 deletions src/polygon/GoogleMapPolygonOverlayRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
AbstractPolygonOverlayRenderer,
type PolygonEntity,
type PolygonState,
overlayStackZ,
} from '@mapconductor/js-sdk-core';
import { GoogleMapActualPolygon } from '../GoogleMapTypeAlias';
import { GoogleMapViewHolder } from '../GoogleMapViewHolder';
Expand Down Expand Up @@ -38,7 +39,7 @@ export class GoogleMapPolygonOverlayRenderer extends AbstractPolygonOverlayRende
strokeWidth: state.strokeWidth,
fillColor: state.fillColor,
geodesic: false,
zIndex: state.zIndex,
zIndex: overlayStackZ('polygon', state.zIndex),
});
this.holder.map.append(polygon);
return polygon;
Expand Down Expand Up @@ -66,7 +67,7 @@ export class GoogleMapPolygonOverlayRenderer extends AbstractPolygonOverlayRende
polygon.strokeWidth = current.state.strokeWidth;
polygon.fillColor = current.state.fillColor;
polygon.geodesic = false;
polygon.zIndex = current.state.zIndex;
polygon.zIndex = overlayStackZ('polygon', current.state.zIndex);
return polygon;
}

Expand Down
5 changes: 3 additions & 2 deletions src/polygon/GoogleMapPolygonOverlayRenderer2D.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
type GeoPoint,
type PolygonEntity,
type PolygonState,
overlayStackZ,
} from '@mapconductor/js-sdk-core';
import { toGoogleMapFillStyle } from '../color';
import { ensureClockwise, ensureCounterClockwise, geoPointToLatLng } from '../helpers';
Expand All @@ -28,7 +29,7 @@ export class GoogleMapPolygonOverlayRenderer2D extends AbstractPolygonOverlayRen
fillColor: fill.color,
fillOpacity: fill.opacity,
geodesic: state.geodesic,
zIndex: state.zIndex,
zIndex: overlayStackZ('polygon', state.zIndex),
clickable: state.clickable,
map: this.holder.map,
});
Expand All @@ -51,7 +52,7 @@ export class GoogleMapPolygonOverlayRenderer2D extends AbstractPolygonOverlayRen
fillColor: fill.color,
fillOpacity: fill.opacity,
geodesic: current.state.geodesic,
zIndex: current.state.zIndex,
zIndex: overlayStackZ('polygon', current.state.zIndex),
clickable: current.state.clickable,
map: this.holder.map,
});
Expand Down
5 changes: 3 additions & 2 deletions src/polyline/GoogleMapPolylineOverlayRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
AbstractPolylineOverlayRenderer,
type PolylineEntity,
type PolylineState,
overlayStackZ,
} from '@mapconductor/js-sdk-core';
import { GoogleMapActualPolyline } from '../GoogleMapTypeAlias';
import { GoogleMapViewHolder } from '../GoogleMapViewHolder';
Expand All @@ -25,7 +26,7 @@ export class GoogleMapPolylineOverlayRenderer extends AbstractPolylineOverlayRen
strokeColor: state.strokeColor,
strokeWidth: state.strokeWidth,
geodesic: state.geodesic,
zIndex: state.zIndex,
zIndex: overlayStackZ('polyline', state.zIndex),
altitudeMode: AltitudeMode.CLAMP_TO_GROUND,
});
this.holder.map.append(polyline);
Expand All @@ -45,7 +46,7 @@ export class GoogleMapPolylineOverlayRenderer extends AbstractPolylineOverlayRen
polyline.strokeColor = current.state.strokeColor;
polyline.strokeWidth = current.state.strokeWidth;
polyline.geodesic = current.state.geodesic;
polyline.zIndex = current.state.zIndex;
polyline.zIndex = overlayStackZ('polyline', current.state.zIndex);
return polyline;
}

Expand Down
5 changes: 3 additions & 2 deletions src/polyline/GoogleMapPolylineOverlayRenderer2D.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
buildUnwrappedPolylinePath,
type PolylineEntity,
type PolylineState,
overlayStackZ,
} from '@mapconductor/js-sdk-core';
import { geoPointToLatLng } from '../helpers';
import { GoogleMapActualPolyline } from '../GoogleMapTypeAlias';
Expand All @@ -23,7 +24,7 @@ export class GoogleMapPolylineOverlayRenderer2D extends AbstractPolylineOverlayR
strokeColor: state.strokeColor,
strokeWeight: state.strokeWidth,
geodesic: state.geodesic,
zIndex: state.zIndex,
zIndex: overlayStackZ('polyline', state.zIndex),
clickable: state.clickable,
map: this.holder.map,
});
Expand All @@ -43,7 +44,7 @@ export class GoogleMapPolylineOverlayRenderer2D extends AbstractPolylineOverlayR
strokeColor: current.state.strokeColor,
strokeWeight: current.state.strokeWidth,
geodesic: current.state.geodesic,
zIndex: current.state.zIndex,
zIndex: overlayStackZ('polyline', current.state.zIndex),
clickable: current.state.clickable,
map: this.holder.map,
});
Expand Down