Creating Transformation without online Map Transformation Calculator

  • 1
  • Question
  • Updated 8 years ago
Can somebody point me in the right direction as to how I should create a Transformation instance (given lat., long, x, y and zoom) without having to resort to the online calculator?
Photo of Shane Ayerst

Shane Ayerst

  • 1 Post
  • 0 Reply Likes
  • unsure

Posted 8 years ago

  • 1
Photo of RandomEtc

RandomEtc, Tween Branch Maintainer

  • 522 Posts
  • 47 Reply Likes
Hi Shane,

The calculator uses javascript which should be very easy to port to actionscript - it's just not something we've done yet.

You can see how to use the linearSolution function to create a Transformation object in the javascript port: or python port if you prefer:

Unless your map uses linear projections, then going from lat lon to x y isn't possible using this method. You also need to figure out how to transform from lat lon to tile coordinates. But these methods should get you started.