2021. 4. 23. 04:02ㆍ카테고리 없음
Downloads are for basic phones that support Java ME such as Nokia S40 phones. They do not work on Android, Apple, Firefox or Windows phones. Download to your Phone. DOWNLOAD Jan 01, 2015 DOWNLOAD Download free Google earth from Section: Java mobile software free & Category: Follow “ download game untuk hp nokia Big collection of free downloads for Nokia Asha 305.
What I want to do:
I want to create a little program in Java (beginner in Java here) in which I specify a GPS location and zoom level and download the map image that Google Maps is showing. Associated with this, I need to have a scale associated with the image (the size in Km of the x and y dimensions of the rectangular image).
What I know:
I know how to get the right image displayed in the browser, specifying GPS location and zoom level directly in the URL (example: https://maps.google.com/maps?f=q&hl=de&geocode=&q=48.167432,+10.533072&z=7). There should be some kind of library like urllib in Python with which I will call this URL.
How to then download this image, and how to know the area pictured in it?I actually found a formula to relate the amount of meters (or whatever unit) 'contained' in a pixel (this function depends on latitude and zoom level of the map). In this case, how to know about the pixels used by the map?
Thank you for any suggestion and/or pointer!
1 Answer
You want to use static maps API.
Your particular map would be at URL
as just an image. Set sensor=true if you're using a GPS sensor to find the location. Otherwise set it to false.
To read the image from this url:
How to then download this image, and how to know the area pictured in it? I actually found a formula to relate the amount of meters (or whatever unit) 'contained' in a pixel (this function depends on latitude and zoom level of the map). In this case, how to know about the pixels used by the map?
You pass pixels and zoom level into the image, so that information is all given with this solution, so your scale should be very easy to calculate.