<p>I'm writing a mapping app that uses a Canvas for positioning elements.  For each element I have to programatically convert element's Lat/Long to the canvas' coordinate, then set the Canvas.Top and Canvas.Left properties.</p>

<p>If I had a 360x180 Canvas, can I convert the coordinates on the canvas to go from -180 to 180 rather than 0 to 360 on the X axis and 90 to -90 rather than 0 to 180  on the Y axis?</p>

<p>Scaling requirements:</p>

<ul>
<li>The canvas can be any size, so should still work if it's 360x180 or 5000x100.</li>
<li>The Lat/Long area may not always be (-90,-180)x(90,180), it could be anything (ie (5,-175)x(89,-174)).</li>
<li>Elements such as PathGeometry which are point base, rather than Canvas.Top/Left based need to work.</li>
</ul>

I'm pretty sure you can't do that exactly, but it would be pretty trivial to have a method which translated from lat/long to Canvas coordinates.
```
```
Point ToCanvas(double lat, double lon) {
  double x = ((lon * myCanvas.ActualWidth) / 360.0) - 180.0;
  double y = ((lat * myCanvas.ActualHeight) / 180.0) - 90.0;
  return new Point(x,y);
}
```
```
(Or something along those lines)