Wednesday, May 19, 2010

Re: Changing Coordinates

On May 19, 4:10 pm, swizz182g <shawnwoodall08...@gmail.com> wrote:
> I work on automotive websites for newspapers around the country. We
> are using street view, but some of the businesses that we deal with
> have coordinates that are not on the street, they have coordinates
> that are in the middle of their building, so the map will not render
> the street view. I informed my boss that the clients should just
> change their coordinates but he suggested that i see if i can find a
> way to dynamically change the coordinates so that they are on the
> street and not on the building. Is there a way to do this?

I'd use getNearestPanorama to set the panorama location nearest to the
building coordinate, and use the building coordinate you have to
calculate the yaw needed. In fact that's a general method: you should
really be using getNearestPanorama anyway, because there is no
guarantee that any panorama will be available for an arbitrary point
on a street.

Have a look at http://www.acleach.me.uk/gmaps/streetview-infow2.htm:
enter an address or click the map; then move the marker to a location
just off a street. That page gets the nearest streetview point and
calculates the yaw required to show what's alongside by looking
perpendicular to a line drawn along the street (to the next Panorama
location).

--
You received this message because you are subscribed to the Google Groups "Google Maps API" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate