Hi, all
I want to display a custom pano in the case there is no standard
StreetView pano, but I want/need the pegman position so I can pass a
location query to a database of pano links. And I'm not finding it.
From my map https://aledev.boisestate.edu/joegawron/campusmap/TestMap.html,
I have the following (~line 233 if you really want to see the rest of
the ugly code...) code snip
function makeStreetView() {
if ( campusView == null ) {
campusView = map.getStreetView();
}
google.maps.event.addListener(campusView, "visible_changed",
function(){
alert("position is " + campusView.getPosition() ) ;
// change this to getPanoAndSwitch() when custom panos are
available ..
campusViewFlag = campusView.getVisible();
if (campusViewFlag) {
setScalingOff();
google.maps.event.addListener(campusView,
"closeclick",
function(){
campusViewFlag =
campusView.getVisible();
setScalingOn();
});
}
else {
setScalingOn();
}
});
}
The alert properly tells me the position when there's a Google
StreetView available, but is undefined if I drop the Pegman onto a
spot on campus where there is no available pano.
I had originally figured on using a click or mouseup event, but
StreetView doesn't have those events exposed, the map object doesn't
have mouseup exposed, and once the Pegman is dropped and the
pano.visible_changed event is fired, the map.click event doesn't seem
to be accessible.
I didn't find anything looking through the forum, and the
Premier API doesn't seem to apply here. So, I'm momentarily out of
ideas on getting the position where the pegman is dropped with no
return pano.
Any takers?
thanks!
Joe
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.