OpenLayers.Handler.Feature Issue not catching mouse events

View: New views
3 Messages — Rating Filter:   Alert me  

OpenLayers.Handler.Feature Issue not catching mouse events

by ChiefDan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In a previous map which did not use MapFish, I used a GML layer to enable mouse overs of areas on my map that were generated from MapServer. Basically I wanted to change the mouse pointer to let the user know they were over the item.
I can't seem to get the same thing working in MapFish, I am wondering if the mouse events are getting intercepted somewhere along the way. I'd appreciate any thoughts or pointers.

Here is a code snippet:
      var myStyles = new OpenLayers.StyleMap({
                                                "default": new OpenLayers.Style({
                                                pointRadius: 4,
                                                fillColor: "#000000",
                                                strokeColor: "#000000",
                                                fillOpacity: 0.0
                                                })
                                            });

      var PlatformGML = new OpenLayers.Layer.GML("RCOOS Platforms",
                                                  "data/platformGML.xml",
                                                  {
                                                    projection: new OpenLayers.Projection("EPSG:900913"),
                                                    styleMap: myStyles,
                                                    displayInLayerSwitcher: false,
                                                    GROUP : 'InSitu'                                              
                                                  });  
                                               
      var platformMouseOverCallbacks =
      {
        "over": function(feature)
        {
          //Only change the cursor if the layer is visible.
          if( HTMLObs.getVisibility() )
          {
            document.getElementById("map").style.cursor="pointer";
          }
            //log("over " + feature.id);
        },
        "out": function(feature)
        {
          document.getElementById("map").style.cursor="default";
          //log("out " + feature.id);
        }
      };
     
      var mouseOverPlatformHandler = new OpenLayers.Handler.Feature
      (
        {
          map: map
        },
        PlatformGML,
        platformMouseOverCallbacks
      );
      mouseOverPlatformHandler.activate();      

Re: OpenLayers.Handler.Feature Issue not catching mouse events

by Eric Lemoine-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday, October 15, 2009, ChiefDan <dan@...> wrote:
>
> In a previous map which did not use MapFish, I used a GML layer to enable
> mouse overs of areas on my map that were generated from MapServer. Basically
> I wanted to change the mouse pointer to let the user know they were over the
> item.
> I can't seem to get the same thing working in MapFish, I am wondering if the
> mouse events are getting intercepted somewhere along the way. I'd appreciate
> any thoughts or pointers.

I've never encountered such issues. It'd be great if you could provide
a small example showing the problem.

PS: sorry for the delayed response, currently catching up on emails.

--
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@...
http://www.camptocamp.com
_______________________________________________
Users mailing list
Users@...
http://www.mapfish.org/cgi-bin/mailman/listinfo/users

Re: OpenLayers.Handler.Feature Issue not catching mouse events

by ChiefDan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Eric,

Thanks for the reply, I'll try and get a small demo up as soon as I can.

Dan


-----Original Message-----
From: Eric Lemoine [mailto:eric.lemoine@...]
Sent: Tuesday, November 03, 2009 11:39 AM
To: ChiefDan
Cc: users@...
Subject: Re: [MapFish-Users] OpenLayers.Handler.Feature Issue not catching
mouse events

On Thursday, October 15, 2009, ChiefDan <dan@...> wrote:
>
> In a previous map which did not use MapFish, I used a GML layer to enable
> mouse overs of areas on my map that were generated from MapServer.
Basically
> I wanted to change the mouse pointer to let the user know they were over
the
> item.
> I can't seem to get the same thing working in MapFish, I am wondering if
the
> mouse events are getting intercepted somewhere along the way. I'd
appreciate
> any thoughts or pointers.

I've never encountered such issues. It'd be great if you could provide
a small example showing the problem.

PS: sorry for the delayed response, currently catching up on emails.

--
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@...
http://www.camptocamp.com

_______________________________________________
Users mailing list
Users@...
http://www.mapfish.org/cgi-bin/mailman/listinfo/users