[OpenLayers-Users] Maker with hover

Jacolin Yves yjacolin at free.fr
Tue Oct 9 03:19:14 EDT 2007


Prasad,

It seems you are using Gmap API, not OpenLayers API.

Regards,

Y.
Le Tuesday 09 October 2007 08:48:57 Prasad Choudhary, vous avez écrit :
> 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 <prasad.choudhary at gmail.com> 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
> > Users at openlayers.org
> > http://openlayers.org/mailman/listinfo/users



-- 
Yves Jacolin
---
http://softlibre.gloobe.org



More information about the Users mailing list