Having a project with a map on which i place little flags (markers) and I drag and zoom the layers that have the map on it. The rest of the layers with for example the UI stays at scale 1. This caused a problem where if the layers with the map and markers were zoomed in and I placed a new marker the coordinates needed adjusting, so I used CanvasToLayerX(2, mouse.X, mouse.Y) and CanvasToLayerY(2, mouse.X, mouse.Y). Everything went fine and the flag would show up where I clicked on the map. Then I pin the flag to the map so when I scroll (drag) the map they move along with it.
Now when placing a marker I send the coordinates I got from CanvasToLayerX and CanvasToLayerY to a mysql database. On start of layout I load them.
They do not load in the right spot though.
When I place the markers while all layers are at scale 1 (completely zoomed out) and I load them while the map is at scale 1 it all works. If I place the markers while zoomed in though, they fail to load on the correct spot.
I hope this is clear without uploading a .capx cause I would have to edit a lot on my project to not give away server details and such.