[Users] popup to show feature information

Mario Nuñez Jimenez mario.nunez at atosresearch.eu
Thu Mar 4 09:46:17 CET 2010


Yes I think it should work but I need a form that is a html table and is the last remedy but I will take it into account.

With a form in the popup I will be able to see the feature information but also I will be able to update it. (I dont know yet how the persistence has to be implemented but I will research about it)

Thank you for your help!
Cheers


-----Original Message-----
From: Alexandre Dube [mailto:adube at mapgears.com] 
Sent: miércoles, 03 de marzo de 2010 19:19
To: Mario Nuñez Jimenez
Cc: users at geoext.org
Subject: Re: [Users] popup to show feature information

Mario,

Try :

var aszAttributes = feature.attributes;
var aszHTML = [];
aszHTML.push("<table>");
for(var key in aszAttributes){
aszHTML.push("<tr><td>"+key+" : </td><td>"+aszAttributes[key]+"</td></tr>";
}
aszHTML.push("</table>");
var szHTML = aszAttributes.join("");

and put in your popup object :
html: szHTML

Regards,

Alexandre


Mario Nuñez Jimenez wrote:
>
> Hello list,
>
> I am trying to do a popup in order to show information of the feature 
> selected.
>
> At this time I am able to select and open the popup but I don’t know 
> how to fill the popup.
>
> Any tip will be welcomed.
>
> My popup:
>
> *function* createPopup(feature) {
>
> popup = *new* GeoExt.Popup ({
>
> title: 'Geometry',
>
> feature: feature,
>
> width: 200,
>
> //_html_: feature.attributes['_description_'],
>
> collapsible: *true*
>
> });
>
> popup.on({
>
> close: *function*(layer) {
>
> selectControl.unselect(*this*.feature);
>
> }
>
> });
>
> popup.show();
>
> }
>
> The commented line is the unique way that I found to get feature 
> information…
>
> Thank you in advance.
>
> Mario.
>
> ------------------------------------------------------------------
> This e-mail and the documents attached are confidential and intended
> solely for the addressee; it may also be privileged. If you receive
> this e-mail in error, please notify the sender immediately and destroy 
> it.
> As its integrity cannot be secured on the Internet, the Atos Origin
> group liability cannot be triggered for the message content. Although
> the sender endeavours to maintain a computer virus-free network,
> the sender does not warrant that this transmission is virus-free and
> will not be liable for any damages resulting from any virus transmitted.
>
> Este mensaje y los ficheros adjuntos pueden contener informacion 
> confidencial
> destinada solamente a la(s) persona(s) mencionadas anteriormente
> pueden estar protegidos por secreto profesional.
> Si usted recibe este correo electronico por error, gracias por informar
> inmediatamente al remitente y destruir el mensaje.
> Al no estar asegurada la integridad de este mensaje sobre la red, Atos 
> Origin
> no se hace responsable por su contenido. Su contenido no constituye 
> ningun
> compromiso para el grupo Atos Origin, salvo ratificacion escrita por 
> ambas partes.
> Aunque se esfuerza al maximo por mantener su red libre de virus, el 
> emisor
> no puede garantizar nada al respecto y no sera responsable de 
> cualesquiera
> danos que puedan resultar de una transmision de virus.
> ------------------------------------------------------------------
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>   


-- 
Alexandre Dubé
Mapgears
www.mapgears.com

------------------------------------------------------------------
This e-mail and the documents attached are confidential and intended 
solely for the addressee; it may also be privileged. If you receive 
this e-mail in error, please notify the sender immediately and destroy it. 
As its integrity cannot be secured on the Internet, the Atos Origin 
group liability cannot be triggered for the message content. Although 
the sender endeavours to maintain a computer virus-free network, 
the sender does not warrant that this transmission is virus-free and 
will not be liable for any damages resulting from any virus transmitted. 

Este mensaje y los ficheros adjuntos pueden contener informacion confidencial 
destinada solamente a la(s) persona(s) mencionadas anteriormente 
pueden estar protegidos por secreto profesional. 
Si usted recibe este correo electronico por error, gracias por informar 
inmediatamente al remitente y destruir el mensaje. 
Al no estar asegurada la integridad de este mensaje sobre la red, Atos Origin 
no se hace responsable por su contenido. Su contenido no constituye ningun 
compromiso para el grupo Atos Origin, salvo ratificacion escrita por ambas partes. 
Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor 
no puede garantizar nada al respecto y no sera responsable de cualesquiera 
danos que puedan resultar de una transmision de virus. 
------------------------------------------------------------------


More information about the Users mailing list