Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REQUESTED FEATURE: Aerial Image and Unit Pixel Ratio Handled Programatically #100

Open
youralien opened this issue Apr 14, 2017 · 0 comments

Comments

@youralien
Copy link

The following steps grabs an aerial image of an intersection (specified by cross streets) and also calculates the unit pixel ratio from the zoom level

I played around with the Google Maps API and I think this is possible using the following steps

# get geolocation
# request: http://maps.googleapis.com/maps/api/geocode/json?address=Great%20Plains%20Ave%20and%20Chestnu%20St

# define zoom level
# i.e. zoom=21

# use zoom to grab aerial satellite image
# request: https://maps.googleapis.com/maps/api/staticmap?center=Great%20Plain%20Ave%20and%20Chapel%20Street%20Needham,%20MA%2002492&zoom=21&size=640x640&scale=1&maptype=satellite

# use zoom to define meters / pixel ratio
# source: https://groups.google.com/forum/#!msg/google-maps-js-api-v3/hDRO4oHVSeM/osOYQYXg2oUJ
# 156543.03392 * Math.cos(latLng.lat() * Math.PI / 180) / Math.pow(2, zoom)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant