mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
render: poly drawing
This commit is contained in:
parent
6ed0361acf
commit
fb087c67ac
7 changed files with 76 additions and 13 deletions
|
@ -47,10 +47,17 @@ export const getTilePlacement = () => {
|
|||
minY,
|
||||
maxY,
|
||||
shiftX: tileTransformTranslate.x - msw2.x,
|
||||
shiftY: window.innerHeight + (tileTransformTranslate.y - msw2.y),
|
||||
// shiftY: window.innerHeight + (tileTransformTranslate.y - msw2.y),
|
||||
shiftY: ((maxY - minY) * 256) - (window.innerHeight + (tileTransformTranslate.y - msw2.y)),
|
||||
size: 256,
|
||||
width,
|
||||
height,
|
||||
zoom,
|
||||
};
|
||||
};
|
||||
|
||||
export const getPolyPlacement = () => (
|
||||
(!editor.poly.poly || !editor.poly.poly.getLatLngs() || editor.poly.poly.getLatLngs().length <= 0)
|
||||
? []
|
||||
: editor.poly.poly.getLatLngs().map((latlng) => ({ ...map.latLngToContainerPoint(latlng) }))
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue