hello,

here is my code for marker
function somefunction()
                { 
                        size = new OpenLayers.Size(21,25);
                        offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
                        icon = new
OpenLayers.Icon('img/marker.png',size,offset);
                        icon2 = new
OpenLayers.Icon('img/marker-blue.png',size.clone(),offset.clone());
                        
                        masterMark = new OpenLayers.Marker(new 
OpenLayers.LonLat(0,0),icon);
                        markerLayer.addMarker(masterMark);
                        masterMark.events.register('mouseover', masterMark, 
function(evt) { 
                                        /* some stuff to do here for markers 
icon change*/

                                          //this.icon = icon2; 
                                         //this.icon.style.cursor='hand';
                                        
//this.icon.imageDiv.style.backgroundImage = SOME_URL;
                                        
                                        Event.stop(evt); 
                                        });
                        
                }

but i failed to achive,

you can visit http://econym.googlepages.com/example_hoverchange75.htm for
demo

Thnaks
Prasad


Eric Lemoine-3 wrote:
> 
> On 10/8/07, Prasad Choudhary <[EMAIL PROTECTED]> wrote:
>> Hello all,
>>
>> I have created a marker and register with some event where i'm changing
>> Icon
>> for that one, but unfortunately its not working. Can any one suggest a
>> better way for this stuff.
> 
> Hello
> 
> Post some code or people won't be able to help you out.
> 
> --
> Eric
> _______________________________________________
> Users mailing list
> [email protected]
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Maker-with-hover-tf4589087.html#a13110307
Sent from the OpenLayers Users mailing list archive at Nabble.com.

_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to