[OpenLayers-Users] Re: Marker with popup

Ryan Williams rwilliams at paqinteractive.com
Wed Feb 16 10:28:43 EST 2011


Have you looked at the Anchored popup or Framed popup?
http://dev.openlayers.org/docs/files/OpenLayers/Popup/Anchored-js.html
Looks like this can do what you want, once you get it configured.

You may also want to look at GeoExt and their popup
http://geoext.org/lib/GeoExt/widgets/Popup.html
really easy to use and it does what you're asking.

Ryan

On 2/16/2011 9:06 AM, benkyma wrote:
> Ok, I fixed that by setting the longlat again after initialisation, like
> this:
>
>
> 			newMark.events.register('mouseover',newMark,function(evt){
> 				var popup = new OpenLayers.Popup("popup_"+this.id,
> 		                   new
> OpenLayers.LonLat(newMark.lonlat.lon,newMark.lonlat.lan),
> 		                   new OpenLayers.Size(200,200),
> 		                   "example popup",
> 		                   true);
> 				popup.lonlat = newMark.lonlat;
> 				this.map.addPopup(popup);
> 			})
>
> Is there an easy way to offset my popup though, for example if I want it to
> appear directly above my marker?
>    

-- 
Ryan Williams, GISP
GIS Analyst / Programmer
PAQ Interactive Inc.
Monticello, IL
www.paqinteractive.com



More information about the Users mailing list