> here is the link -http://moneyma.com/test.html, in this first im > passing the points (40.440743,-79.799193) which snaps to the nearest > street whose lat lng is (44.44079,-79.79924000000001), but that street > also doesnt have the street view. My aim is to find the nearest street > view.
I can't think of a way to do it without using brute force, testing points spiralling out from your start. It would help enormously if there were some limit to your search, rather than the open-ended 'nearest'. In some places, the nearest Panorama may be on another continent. Do you really want that? Do you still really want the nearest if it is 5km away? 1km? I think this event could be exploited to see if there is any streetview data at a coarse level - http://code.google.com/apis/maps/documentation/reference.html#GStreetviewOverlay.changed Maybe you could place a GStreetviewOverlay on a dummy invisible second map, zoomed tightly in on your location. Step the zoom out, when the event fires you know some Streetview data has come into the bounds of the map. Check the distance ( it'll be between the distance of the previous bounds and the current one) to see if it falls in your "sensible" range. If it does, do the brute force thing - but you can start working out from that distance of the previous bounds, since you know there's nothing closer. There may well be a more cunning approach! It would be useful if getNearestPanoramaLatLng() offered some option about the search distance, but it doesn't. It's been mentioned before, but no-one has yet raised an enhancement request for it that I can see. But - there is such a request for getNearestPanorama(), which is so close to the same you might like to add your 'star' (vote) http://code.google.com/p/gmaps-api-issues/issues/detail?id=1182&q=getNearestPanorama&colspec=ID%20Type%20Status%20Introduced%20Fixed%20Summary%20Stars%20ApiType%20Internal cheers, Ross K --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
