Coder Social home page Coder Social logo

Comments (5)

radioman avatar radioman commented on July 19, 2024

..yes its a tricky business, offset and scaling matrix is at play

from greatmaps.

TAlecksen avatar TAlecksen commented on July 19, 2024

Fantastic control by the way!

Based on what I can see, it looks like the panning is handled by the TranslateTransform. The scaling is handled by the two lines in FromLatLngToLocal:

ret.X = (int)(Core.renderOffset.X + ((Core.renderOffset.X - ret.X) * -MapRenderTransform.Value));
ret.Y = (int)(Core.renderOffset.Y + ((Core.renderOffset.Y - ret.Y) * -MapRenderTransform.Value));

The thing I have not yet figured out is why the Core.renderOffset gets updated correctly when zooming in whole number, but not when the zooming is fractional. Anyone get anywhere with this?

from greatmaps.

radioman avatar radioman commented on July 19, 2024

check https://github.com/radioman/greatmaps/blob/master/GMap.NET.Core/GMap.NET.Internals/Core.cs#L670

compensationOffset is equal positionPixel on zoom

from greatmaps.

AliFlux avatar AliFlux commented on July 19, 2024

@TAlecksen, please do share your work if you come across any solution. I've the same issue, and trying to use ScaleTransform but it's tricky and only limited to WPF.

from greatmaps.

TAlecksen avatar TAlecksen commented on July 19, 2024

@AliFlux I most certainly will if I manage to get anywhere.

from greatmaps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.