[OpenLayers-Dev] (no subject)

Roald de Wit list at rdewit.net
Mon Jan 10 16:42:15 EST 2011


Hi,

Please send your question to the OL *Users* list [1] as you are *using* 
OL for developing your own application. This is a mailing list for OL 
*Developers*:

"Developers mailing list for OpenLayers. Ideal if you're modifying 
OpenLayers classes, creating subclasses, or otherwise getting into the 
guts of OpenLayers."

Plus: make sure you use a (relevant) subject when sending an email to 
the list.

Regards, Roald
[1] http://lists.osgeo.org/mailman/listinfo/openlayers-users

On 11/01/11 01:23, carlos wrote:
>
> Hi all!!!
>
> I had this function, in order to, add markers to my map.
>
> function addMarker(ll, popupClass, popupContentHTML, closeBox, overflow) {
>
> var feature = new OpenLayers.Feature(markers, ll);
>
> feature.closeBox = closeBox;
>
> feature.popupClass = popupClass;
>
> feature.data.popupContentHTML = popupContentHTML;
>
> feature.data.overflow = (overflow) ? "auto" : "hidden";
>
> var marker = feature.createMarker();
>
> var size = new OpenLayers.Size(25,25);
>
> var offset = new OpenLayers.Pixel(-12, -24);
>
> var icon = new 
> OpenLayers.Icon('http://www.openlayers.org/dev/img/marker-blue.png', 
> size, offset);
>
> marker.icon = icon;
>
> var markerClick = function (evt) {
>
> if (this.popup == null) {
>
> this.popup = this.createPopup(this.closeBox);
>
> map.addPopup(this.popup);
>
> this.popup.show();
>
> } else {
>
> this.popup.toggle();
>
> }
>
> currentPopup = this.popup;
>
> OpenLayers.Event.stop(evt);
>
> };
>
> marker.events.register("mousedown", feature, markerClick);
>
> markers.addMarker(marker);
>
> }
>
> I have a problem with the icon of the marker. If I put an icon the 
> event mousedown don’t work. The pop-up of my marker don't appear. 
> There is any trouble with that?
>
> Thanks!!!
>
> 	
>
> */Carlos Domínguez/*
>
> 	
>
> /Área de Proyectos/
>
> 	
>
> /Tfno: +34 948312156/
>
> 	
>
> www.geoactio.com <http://www.geoactio.com/>
>
> 	
>
> Polígono Industrial Mocholi
>
> 	
>
> Edificio CEIN, Nave A2
>
> 	
>
> 31110 Noáin (Navarra) SPAIN
>
> 	
>
> 	
>
> La información que contiene este correo electrónico es confidencial. 
> Si Vd. ha recibido esta comunicación por error, por favor notifíquelo 
> inmediatamente al remitente y bórrelo. Antes de imprimir este mensaje, 
> asegúrese de que es necesario. El medio ambiente está en nuestra mano.
>
> 	
>
> The information contained in this electronic mail is confidential. If 
> you have received this mail by error, please immediately notify the 
> sender and delete it. Please, consider the environment and do not 
> print this email unless it is absolutely necessary.
>
>
> _______________________________________________
> Dev mailing list
> Dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-dev


More information about the Dev mailing list