My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 4189: Add a scale bar to static maps
27 people starred this issue and may be notified of changes. Back to list
Status:  NeatIdea
Owner:  ----


Sign in to add a comment
 
Project Member Reported by [email protected], Jun 4, 2012
Currently the static map images do not have a scale bar, this feature request is to add a scale bar to staticmap images.

One workaround would be to use an estimated calculation. If R_EARTH is the earth radius (R_EARTH = 6378137) then the JS formula would be:

var pixels_per_kilometer = (size_of_map_in_pixels *1000) / ((Math.cos(latitude_of_map_center*Math.PI/180) * 2*Math.PI * R_EARTH )/ (256* Math.pow(2,map_zoom_level)) * 600)

*********************************************************
For developers viewing this issue: please click the 'star' icon to be
notified of future changes, and to let us know how many of you are
interested in seeing it resolved.
*********************************************************
Jun 4, 2012
Project Member #1 [email protected]
(No comment was entered for this change.)
Labels: Internal-861599
Jul 30, 2012
#2 [email protected]
(No comment was entered for this change.)
Dec 11, 2012
#3 [email protected]
Definitely very important. Many housing websites use Google Maps embedded so there is no sense of scale for these sites; quite embarrassing

Jun 2, 2013
#4 [email protected]
(No comment was entered for this change.)
Status: Acknowledged
Apr 10, 2014
#5 [email protected]
+ 1
Mar 19, 2015
Project Member #6 [email protected]
(No comment was entered for this change.)
Status: NeatIdea
Owner: ---
Jun 19, 2015
#7 [email protected]
+1. Ideally every map should have scale and direction. 

Is there any way i can get the value of scale control value in google map, so that i can draw a scale using canvas over the image? I tried using the formula to get pixels per meter, but i could not formulate a way to return the rounded values shown in the map.
Jun 19, 2015
#8 [email protected]
the direction of static maps would be "north up"!
Jun 20, 2015
#9 [email protected]
Thanks. 
But there should be an option to specify direction and location in the static map. In my project i draw static map to a canvas and let user to add some cameras. The users can rotate the map also. so it would be helpful to have direction arrows.

I am struggling to show the scale shown in google maps.
Jun 22, 2015
#12 [email protected]
I guess Google cannot provide you with rotated static maps. Just imagine - the basic map layer has to be cached in some way for every zoom level. With rotation there would be an additional set of images for every degree? You might also check the license of static maps. "Canvas" sounds like a desktop application. Google only allows you to use the maps in a web- or mobile application. For which, the maps javascript API would be your best option! ;-)
Aug 26, 2015
Project Member #13 [email protected]
 Issue 6588  has been merged into this issue.
Sign in to add a comment

Powered by Google Project Hosting