I am recently writing some location-based application using J2ME. One of the task is to cache some maps locally on the phone, so a time consuming map loading from web could be avoided. The rule of thumb is of course precise mapping between the map coordinates to screen coordinates.
Take some advantage of Google Map will be an quick and easy way, as the URL is encoded with longitude and latitude values. One of the maps I used has a URL like this: ll=42.065957,-88.048339&spn=0.007678,0.027122
"spn" is for "span", which is easy to guess. By my guess that "ll" stands for "Lower Left" is wrong. It is actually the center of the map. Tricky! So, the decoded format of the URL is:
ll=latitude_of_map_center, longitude_of_map_center & spn= total_latitude_span, total_longitude_span.
Sunday, November 05, 2006
Subscribe to:
Posts (Atom)