I would like to see a macro which automatically detects if a cache is a drive in cache (ie: a street should be 20-50 meters nearby the cache).
A combination of an Google Api call and some GSAK macro code to set a custom data field "CruiseCache" to true should do the trick. I just don't know how to build such a macro.
Any help appreciated. Macro Code preferred.
Hans
A combination of an Google Api call and some GSAK macro code to set a custom data field "CruiseCache" to true should do the trick. I just don't know how to build such a macro.
CODE |
var map; var berkeley = new google.maps.LatLng(37.869085,-122.254775); var sv = new google.maps.StreetViewService(); var panorama; function initialize() { panorama = new google.maps.StreetViewPanorama(document.getElementById("pano")); // Set up the map var mapOptions = { center: berkeley, zoom: 16, mapTypeId: google.maps.MapTypeId.ROADMAP, streetViewControl: false }; map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); // getPanoramaByLocation will return the nearest pano when the // given radius is 50 meters or less. google.maps.event.addListener(map, 'click', function(event) { sv.getPanoramaByLocation(event.latLng, 50, processSVData); }); } function processSVData(data, status) { if (status == google.maps.StreetViewStatus.OK) { var marker = new google.maps.Marker({ position: data.location.latLng, map: map, title: data.location.description }); google.maps.event.addListener(marker, 'click', function() { var markerPanoID = data.location.pano; // Set the Pano to use the passed panoID panorama.setPano(markerPanoID); panorama.setPov({ heading: 270, pitch: 0 }); panorama.setVisible(true); }); } } |
Any help appreciated. Macro Code preferred.

Hans