Thanks,
I removed that click event and added:

        GEvent.addListener(map, "click", function(overlay, latlng){
            if (latlng) {
                var myHtml = "The Latitude and Longitude values are:
<br>" + latlng + "<br>";
                map.openInfoWindow(latlng, myHtml);
            }
        });

This worked fine.

But now I am trying to attach a streetview by adding:

        svOverlay = new GStreetviewOverlay();
        map.addOverlay(svOverlay);

        GEvent.addListener(map,"click", function(overlay,latlng) {
          myPano.setLocationAndPOV(latlng);
        });

and the error I get is:
<b>this.o is null </b>

This segment is exactly as is at:
http://code.google.com/apis/maps/documentation/examples/streetview-click.html

Thanks.
Ismail Lunat




On Aug 11, 3:21 pm, Mike Williams <[email protected]> wrote:
> Map click events can either return a point or an overlay. You need to
> check which of those has happened before opening the "Clicked here"
> window:
>
>         GEvent.addListener(map,"click", function(point,overlay){
>           if (point) {
>             map.openInfoWindowHtml(point, "Clicked Here");
>           }
>         });
>
> --
> Mike Williamshttp://econym.org.uk/gmap
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to