P Pachuquin Member Licensed User Longtime User Jun 24, 2010 #1 Excuse my english I'm developing an application that uses a static google map. I know how to convert a longitude to pixel to place a marker in the map, but i don't know how to convert the latitude. B4X: Request.New1("http://maps.google.com/staticmap?center=" & latitude & "," & longitude &"&zoom=" & zoom & "&size=" & map.width & "x" & map.height) Response.New1 args.New1(1) Response.Value = Request.GetResponse args.SetObject(0,Response.GetStream) ' obj1.CreateNew2("System.Drawing.Bitmap" & obj1.System_Drawing,args.Value) map.Image = obj1.Value MarkerX=(MarkerLongitude+180)*256*2^zoom/360
Excuse my english I'm developing an application that uses a static google map. I know how to convert a longitude to pixel to place a marker in the map, but i don't know how to convert the latitude. B4X: Request.New1("http://maps.google.com/staticmap?center=" & latitude & "," & longitude &"&zoom=" & zoom & "&size=" & map.width & "x" & map.height) Response.New1 args.New1(1) Response.Value = Request.GetResponse args.SetObject(0,Response.GetStream) ' obj1.CreateNew2("System.Drawing.Bitmap" & obj1.System_Drawing,args.Value) map.Image = obj1.Value MarkerX=(MarkerLongitude+180)*256*2^zoom/360
Erel B4X founder Staff member Licensed User Longtime User Jun 24, 2010 #2 You can convert the lat/lon coordinates to UTM with the GPS library. UTM coordinates are scaled linearly and are easier to work with.
You can convert the lat/lon coordinates to UTM with the GPS library. UTM coordinates are scaled linearly and are easier to work with.