when i click controllers it works actually its when i scroll the zoom/in/out

On Thu, Apr 15, 2010 at 11:14 AM, slick101 <[email protected]>wrote:

> Hey guys sorry for this newb question...but I am trying to add event
> when the map itself is clicked or any controls are clicked to fire an
> event. I integrated qtip with my map, and the qtip tends to stay ontop
> of map when i begin to drag or if i zoom in and out.
>
> I am using jquery framework.
>
> following code:
>
> function exposeMarker(marker,html) {
>                                        if(qtip != null){
>                                                $("#message").qtip("hide");
>                                        }
>                                        moveEnd = GEvent.addListener(map,
> "moveend", function(){
>                                                var markerOffset =
> map.fromLatLngToDivPixel(marker.getPoint());
>                                                qtip = $("#message").css({
> top:markerOffset.y,
> left:markerOffset.x , visibility:'hidden'}).html(html).show().qtip({
>
>  content:$("#message").html(),
>                                                        position:{
>                                                                target:
> 'mouse',
>                                                                adjust: {
>
>  mouse:false
>                                                                },
>                                                                corner:{
>
>  target:'topMiddle',tooltip:'bottomMiddle'}
>                                                                },
>                                                                style:{
>
>  border: {
>
>    width: 5,
>
>    radius: 10
>                                                                        },
>
>  tip:true
>                                                                },
>                                                                show:{
>
>  ready: true
>                                                                },
>                                                                hide: {
> when: { event: 'unfocus' } }
>                                                        });
>
>  GEvent.removeListener(moveEnd);
>                                        });
>
>                                        left =
> map.getBounds().getSouthWest().lat();
>                                        right =
> map.getBounds().getNorthEast().lat();
>                                        offset = (right - left) * .25;
>                                        map.panTo(new
> GLatLng(marker.getPoint().lat(),
> marker.getPoint().lng()+offset));
>                                }
>
> I put following code:
>
>                                $("#map > div").live("click", function(){
>                                        if(qtip == null)
>                                                return;
>                                        $("#message").qtip("hide");
>                                });
>
> but it only works when i release after moving...and does not work if I
> use any controls on the map.
>
> --
> 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]<google-maps-api%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-maps-api?hl=en.
>
>

-- 
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