[OpenLayers-Users] on mouseover icon change

Andreas Heckwolf andreas.heckwolf at menturagroup.com
Tue Apr 3 02:33:56 EDT 2012


Hello,

I am using the SelectFeature control with 'hover' set to true. Using
appropriate styles for the layer in question the icon changes on feature
selection/de-selection. Hope this gives you the right direction.

Andreas



var objectStyleMap=new OpenLayers.StyleMap({
        "default": new OpenLayers.Style({
              pointRadius: 10,
                    externalGraphic: "images/24x24/pin_blue.png",
                    label: "${shape_name}",
                    strokeWidth: 3,
                    strokeColor: "#909090",
                    fillColor: "#A33665",
                    fillOpacity: 0.7
                    }),
        "select": new OpenLayers.Style({
              pointRadius: 10,
                    externalGraphic: "images/24x24/pin_orange.png",
                    label: "${shape_name}",
                    strokeWidth: 3,
                    strokeColor: "#AAAAAA",
                    fillColor: "#A03423",
                    fillOpacity: 0.7 
                    })
            });


On Tue, 2012-04-03 at 05:59 +0000, Neelima Emmani wrote:
> Hi All,
> 
> I have point feature shown with a icon. Now on mouseover i want the icon to be changed to another or atleast hightlight the existing icon. Does any one  have any idea.
> Any help will be appreciated.
> awaiting reply
> 
> With Regards,
> Neelima Emmani
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users

-- 
\_________________________________________________________________
Dipl.-Ing. Andreas Heckwolf              Voice : +358 40 5847 445
  Mentura Group Oy                         Fax: +358 424480 800 
    Lönnrotinkatu 32 A 26 00180 Helsinki www.menturagroup.com



More information about the Users mailing list