From dcbc807526b5eb456e33e22d794374ae7ff3723b Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 11 Mar 2010 18:23:22 +0000 Subject: [PATCH] Improve user popups on friend/nearby mapper maps. --- app/views/user/_map.html.erb | 61 +++++++++++++-------------------- app/views/user/_popup.html.erb | 5 +++ config/locales/en.yml | 8 ++--- config/openlayers.cfg | 2 +- public/javascripts/map.js | 8 ++--- public/openlayers/OpenLayers.js | 15 ++++++-- public/stylesheets/common.css | 11 ++++++ 7 files changed, 62 insertions(+), 48 deletions(-) create mode 100644 app/views/user/_popup.html.erb diff --git a/app/views/user/_map.html.erb b/app/views/user/_map.html.erb index 17f4ed344..912bde949 100644 --- a/app/views/user/_map.html.erb +++ b/app/views/user/_map.html.erb @@ -1,24 +1,5 @@ - +<% friends = @user.friends.collect { |f| f.befriendee }.select { |f| !f.home_lat.nil? and !f.home_lon.nil? } %> +<% nearest = @user.nearby - friends %> <% if @user.home_lat.nil? or @user.home_lon.nil? %> <% lon = h(params['lon'] || '-0.1') %> @@ -56,24 +37,29 @@ setMapCenter(centre, zoom); <% if marker %> - marker = addMarkerToMap(new OpenLayers.LonLat(<%= mlon %>, <%= mlat %>), null, "<%= t 'user.map.your location' %>"); + marker = addMarkerToMap( + new OpenLayers.LonLat(<%= mlon %>, <%= mlat %>), null, + '<%= escape_javascript(render :partial => "popup", :object => @user, :locals => { :type => "your location" }) %>' + ); <% end %> var near_icon = OpenLayers.Marker.defaultIcon(); - near_icon.url = OpenLayers.Util.getImagesLocation() + "marker-green.png";; - var i = nearest.length; - while( i-- ) { - var description = i18n('<%= t 'user.map.nearby mapper'%>', { nearby_user: ''+nearest[i].display_name+'' }); - var nearmarker = addMarkerToMap(new OpenLayers.LonLat(nearest[i].home_lon, nearest[i].home_lat), near_icon.clone(), description); - } + near_icon.url = OpenLayers.Util.getImagesLocation() + "marker-green.png"; + <% nearest.each do |u| %> + addMarkerToMap(new OpenLayers.LonLat( + <%= u.home_lon %>, <%= u.home_lat %>), near_icon.clone(), + '<%= escape_javascript(render :partial => "popup", :object => u, :locals => { :type => "nearby mapper" }) %>' + ); + <% end %> var friend_icon = OpenLayers.Marker.defaultIcon(); - friend_icon.url = OpenLayers.Util.getImagesLocation() + "marker-blue.png";; - var i = friends.length; - while( i-- ) { - var description = i18n('<%= t 'user.map.friend'%>', { friend_user: ''+friends[i].display_name+'' }); - var friendmarker = addMarkerToMap(new OpenLayers.LonLat(friends[i].home_lon, friends[i].home_lat), friend_icon.clone(), description); - } + friend_icon.url = OpenLayers.Util.getImagesLocation() + "marker-blue.png"; + <% friends.each do |u| %> + addMarkerToMap(new OpenLayers.LonLat( + <%= u.home_lon %>, <%= u.home_lat %>), friend_icon.clone(), + '<%= escape_javascript(render :partial => "popup", :object => u, :locals => { :type => "friend" }) %>' + ); + <% end %> if (document.getElementById('updatehome')) { map.events.register("click", map, setHome); @@ -94,12 +80,13 @@ removeMarkerFromMap(marker); } - marker = addMarkerToMap(lonlat, null, "<%= t 'user.map.your location' %>"); + marker = addMarkerToMap( + lonlat, null, + '<%= escape_javascript(render :partial => "popup", :object => @user, :locals => { :type => "your location" }) %>' + ); } } window.onload = init; // --> - - diff --git a/app/views/user/_popup.html.erb b/app/views/user/_popup.html.erb new file mode 100644 index 000000000..cad5f7909 --- /dev/null +++ b/app/views/user/_popup.html.erb @@ -0,0 +1,5 @@ +
+ <%= user_thumbnail popup, :style => "float :left" %> +

<%= t('user.popup.' + type) %>

+

<%= link_to popup.display_name, :controller => "user", :action => "view", :display_name => popup.display_name %>

+
diff --git a/config/locales/en.yml b/config/locales/en.yml index 45c21f36b..1c6b0df7e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1450,10 +1450,10 @@ en: unhide_user: "unhide this user" delete_user: "delete this user" confirm: "Confirm" - map: - your location: Your location - nearby mapper: "Nearby mapper: [[nearby_user]]" - friend: "Friend: [[friend_user]]" + popup: + your location: "Your location" + nearby mapper: "Nearby mapper" + friend: "Friend" account: title: "Edit account" my settings: My settings diff --git a/config/openlayers.cfg b/config/openlayers.cfg index 7b71ca1a5..39c2cc58a 100644 --- a/config/openlayers.cfg +++ b/config/openlayers.cfg @@ -40,7 +40,7 @@ OpenLayers/Renderer/VML.js OpenLayers/Rule.js OpenLayers/Icon.js OpenLayers/Marker.js -OpenLayers/Popup/AnchoredBuddle.js +OpenLayers/Popup/FramedCloud.js OpenLayers/Projection.js OpenLayers/Console.js OpenLayers/Lang.js diff --git a/public/javascripts/map.js b/public/javascripts/map.js index 2349c3230..ab15198ab 100644 --- a/public/javascripts/map.js +++ b/public/javascripts/map.js @@ -96,7 +96,8 @@ function addMarkerToMap(position, icon, description) { markers.addMarker(marker); if (description) { - marker.events.register("click", marker, function() { openMapPopup(marker, description) }); + marker.events.register("mouseover", marker, function() { openMapPopup(marker, description) }); + marker.events.register("mouseout", marker, function() { closeMapPopup() }); } return marker; @@ -169,10 +170,9 @@ function addBoxToMap(boxbounds) { function openMapPopup(marker, description) { closeMapPopup(); - popup = new OpenLayers.Popup.AnchoredBubble("popup", marker.lonlat, null, - description, marker.icon, true); + popup = new OpenLayers.Popup.FramedCloud("popup", marker.lonlat, null, + description, marker.icon, true); popup.setBackgroundColor("#E3FFC5"); - popup.autoSize = true; map.addPopup(popup); return popup; diff --git a/public/openlayers/OpenLayers.js b/public/openlayers/OpenLayers.js index 252a25acc..ee2469999 100644 --- a/public/openlayers/OpenLayers.js +++ b/public/openlayers/OpenLayers.js @@ -441,7 +441,18 @@ if(!this.element.offsets){this.element.offsets=OpenLayers.Util.pagePosition(this return new OpenLayers.Pixel((evt.clientX+this.element.scrolls[0])-this.element.offsets[0] -this.element.lefttop[0],(evt.clientY+this.element.scrolls[1])-this.element.offsets[1] -this.element.lefttop[1]);},CLASS_NAME:"OpenLayers.Events"});OpenLayers.Format=OpenLayers.Class({options:null,externalProjection:null,internalProjection:null,data:null,keepData:false,initialize:function(options){OpenLayers.Util.extend(this,options);this.options=options;},destroy:function(){},read:function(data){OpenLayers.Console.userError(OpenLayers.i18n("readNotImplemented"));},write:function(object){OpenLayers.Console.userError(OpenLayers.i18n("writeNotImplemented"));},CLASS_NAME:"OpenLayers.Format"});OpenLayers.Lang.ca={'unhandledRequest':"Resposta a petició no gestionada ${statusText}",'permalink':"Enllaç permanent",'overlays':"Capes addicionals",'baseLayer':"Capa Base",'sameProjection':"El mapa de referència només funciona si té la mateixa projecció que el mapa principal",'readNotImplemented':"Lectura no implementada.",'writeNotImplemented':"Escriptura no implementada.",'noFID':"No es pot actualitzar un element per al que no existeix FID.",'errorLoadingGML':"Error caregant el fitxer GML ${url}",'browserNotSupported':"El seu navegador no suporta renderització vectorial. Els renderitzadors suportats actualmente són:\n${renderers}",'componentShouldBe':"addFeatures : el component ha de ser de tipus ${geomType}",'getFeatureError':"getFeatureFromEvent ha estat cridat a una capa sense renderizador. Això normalment vol dir que "+"s'ha eliminat una capa, però no el handler associat a ella.",'minZoomLevelError':"La propietat minZoomLevel s'ha d'utilitzar només "+"amb les capes que tenen FixedZoomLevels. El fet que "+"una capa wfs comprovi minZoomLevel és una reliquia del "+"passat. No podem, però, eliminar-la sense trencar "+"les aplicacions d'OpenLayers que en puguin dependre. "+"Així doncs estem fent-la obsoleta -- la comprovació "+"minZoomLevel s'eliminarà a la versió 3.0. Feu servir "+"els paràmetres min/max resolution en substitució, tal com es descriu aquí: "+"http://trac.openlayers.org/wiki/SettingZoomLevels",'commitSuccess':"Transacció WFS: CORRECTA ${response}",'commitFailed':"Transacció WFS: HA FALLAT ${response}",'googleWarning':"La capa Google no s'ha pogut carregar correctament.

"+"Per evitar aquest missatge, sel·leccioneu una nova Capa Base "+"al gestor de capes de la cantonada superior dreta.

"+"Probablement això és degut a que l'script de la biblioteca de "+"Google Maps no ha estat inclòs a la vostra pàgina, o no "+"conté la clau de l'API correcta per a la vostra adreça.

"+"Desenvolupadors: Per obtenir consells sobre com fer anar això, "+"féu clic aquí",'getLayerWarning':"Per evitar aquest missatge, sel·leccioneu una nova Capa Base "+"al gestor de capes de la cantonada superior dreta.

"+"Probablement això és degut a que l'script de la biblioteca "+"${layerLib} "+"no ha estat inclòs a la vostra pàgina.

"+"Desenvolupadors: Per obtenir consells sobre com fer anar això, "+"féu clic aquí",'scale':"Escala = 1 : ${scaleDenom}",'layerAlreadyAdded':"Heu intentat afegir la capa: ${layerName} al mapa, pero ja ha estat afegida anteriorment",'reprojectDeprecated':"Esteu fent servir l'opció 'reproject' a la capa "+"${layerName}. Aquesta opció és obsoleta: el seu ús fou concebut "+"per suportar la visualització de dades sobre mapes base comercials, "+"però aquesta funcionalitat s'hauria d'assolir ara mitjançant el suport "+"de la projecció Spherical Mercator. Més informació disponible a "+"http://trac.openlayers.org/wiki/SphericalMercator.",'methodDeprecated':"Aquest mètode és obsolet i s'eliminará a la versió 3.0. "+"Si us plau feu servir em mètode alternatiu ${newMethod}.",'boundsAddError':"Ha de proporcionar els valors x i y a la funció add.",'lonlatAddError':"Ha de proporcionar els valors lon i lat a la funció add.",'pixelAddError':"Ha de proporcionar els valors x i y a la funció add.",'unsupportedGeometryType':"Tipus de geometria no suportada: ${geomType}",'pagePositionFailed':"OpenLayers.Util.pagePosition ha fallat: l'element amb id ${elemId} pot estar fora de lloc.",'filterEvaluateNotImplemented':"evaluate no està implementat per aquest tipus de filtre.",'end':''};OpenLayers.Lang.en={'unhandledRequest':"Unhandled request return ${statusText}",'permalink':"Permalink",'overlays':"Overlays",'baseLayer':"Base Layer",'sameProjection':"The overview map only works when it is in the same projection as the main map",'readNotImplemented':"Read not implemented.",'writeNotImplemented':"Write not implemented.",'noFID':"Can't update a feature for which there is no FID.",'errorLoadingGML':"Error in loading GML file ${url}",'browserNotSupported':"Your browser does not support vector rendering. Currently supported renderers are:\n${renderers}",'componentShouldBe':"addFeatures : component should be an ${geomType}",'getFeatureError':"getFeatureFromEvent called on layer with no renderer. This usually means you "+"destroyed a layer, but not some handler which is associated with it.",'minZoomLevelError':"The minZoomLevel property is only intended for use "+"with the FixedZoomLevels-descendent layers. That this "+"wfs layer checks for minZoomLevel is a relic of the"+"past. We cannot, however, remove it without possibly "+"breaking OL based applications that may depend on it."+" Therefore we are deprecating it -- the minZoomLevel "+"check below will be removed at 3.0. Please instead "+"use min/max resolution setting as described here: "+"http://trac.openlayers.org/wiki/SettingZoomLevels",'commitSuccess':"WFS Transaction: SUCCESS ${response}",'commitFailed':"WFS Transaction: FAILED ${response}",'googleWarning':"The Google Layer was unable to load correctly.

"+"To get rid of this message, select a new BaseLayer "+"in the layer switcher in the upper-right corner.

"+"Most likely, this is because the Google Maps library "+"script was either not included, or does not contain the "+"correct API key for your site.

"+"Developers: For help getting this working correctly, "+"click here",'getLayerWarning':"The ${layerType} Layer was unable to load correctly.

"+"To get rid of this message, select a new BaseLayer "+"in the layer switcher in the upper-right corner.

"+"Most likely, this is because the ${layerLib} library "+"script was not correctly included.

"+"Developers: For help getting this working correctly, "+"click here",'scale':"Scale = 1 : ${scaleDenom}",'layerAlreadyAdded':"You tried to add the layer: ${layerName} to the map, but it has already been added",'reprojectDeprecated':"You are using the 'reproject' option "+"on the ${layerName} layer. This option is deprecated: "+"its use was designed to support displaying data over commercial "+"basemaps, but that functionality should now be achieved by using "+"Spherical Mercator support. More information is available from "+"http://trac.openlayers.org/wiki/SphericalMercator.",'methodDeprecated':"This method has been deprecated and will be removed in 3.0. "+"Please use ${newMethod} instead.",'boundsAddError':"You must pass both x and y values to the add function.",'lonlatAddError':"You must pass both lon and lat values to the add function.",'pixelAddError':"You must pass both x and y values to the add function.",'unsupportedGeometryType':"Unsupported geometry type: ${geomType}",'pagePositionFailed':"OpenLayers.Util.pagePosition failed: element with id ${elemId} may be misplaced.",'end':'','filterEvaluateNotImplemented':"evaluate is not implemented for this filter type."};OpenLayers.Lang.es={'unhandledRequest':"Respuesta a petición no gestionada ${statusText}",'permalink':"Enlace permanente",'overlays':"Capas superpuestas",'baseLayer':"Capa Base",'sameProjection':"El mini mapa sólo funciona si está en la misma proyección que el mapa principal",'readNotImplemented':"Lectura no implementada.",'writeNotImplemented':"Escritura no implementada.",'noFID':"No se puede actualizar un elemento para el que no existe FID.",'errorLoadingGML':"Error cargando el fichero GML ${url}",'browserNotSupported':"Su navegador no soporta renderización vectorial. Los renderizadores soportados actualmente son:\n${renderers}",'componentShouldBe':"addFeatures : el componente debe ser del tipo ${geomType}",'getFeatureError':"getFeatureFromEvent llamado en una capa sin renderizador. Esto normalmente quiere decir que "+"se ha destruido una capa, pero no el manejador asociado a ella.",'minZoomLevelError':"La propiedad minZoomLevel debe sólo utilizarse "+"con las capas que tienen FixedZoomLevels. El hecho de que "+"una capa wfs compruebe minZoomLevel is una reliquia del "+"pasado. Sin embargo, no podemos eliminarla sin discontinuar "+"probablemente las aplicaciones OL que puedan depender de ello. "+"Así pues estamos haciéndolo obsoleto --la comprobación "+"minZoomLevel se eliminará en la versión 3.0. Utilice el ajuste "+"de resolution min/max en su lugar, tal como se describe aquí: "+"http://trac.openlayers.org/wiki/SettingZoomLevels",'commitSuccess':"Transacción WFS: ÉXITO ${response}",'commitFailed':"Transacción WFS: FALLÓ ${response}",'googleWarning':"La capa Google no pudo ser cargada correctamente.

"+"Para evitar este mensaje, seleccione una nueva Capa Base "+"en el selector de capas en la esquina superior derecha.

"+"Probablemente, esto se debe a que el script de la biblioteca de "+"Google Maps no fue correctamente incluido en su página, o no "+"contiene la clave del API correcta para su sitio.

"+"Desarrolladores: Para ayudar a hacer funcionar esto correctamente, "+"haga clic aquí",'getLayerWarning':"La capa ${layerType} no pudo ser cargada correctamente.

"+"Para evitar este mensaje, seleccione una nueva Capa Base "+"en el selector de capas en la esquina superior derecha.

"+"Probablemente, esto se debe a que el script de "+"la biblioteca ${layerLib} "+"no fue correctamente incluido en su página.

"+"Desarrolladores: Para ayudar a hacer funcionar esto correctamente, "+"haga clic aquí",'scale':"Escala = 1 : ${scaleDenom}",'layerAlreadyAdded':"Intentó añadir la capa: ${layerName} al mapa, pero ya había sido añadida previamente",'reprojectDeprecated':"Está usando la opción 'reproject' en la capa "+"${layerName}. Esta opción está obsoleta: su uso fue diseñado "+"para soportar la visualización de datos sobre mapas base comerciales, "+"pero esa funcionalidad debería conseguirse ahora mediante el soporte "+"de la proyección Spherical Mercator. Más información disponible en "+"http://trac.openlayers.org/wiki/SphericalMercator.",'methodDeprecated':"Este método está obsoleto y se eliminará en la versión 3.0. "+"Por favor utilice el método ${newMethod} en su lugar.",'boundsAddError':"Debe proporcionar los valores x e y a la función add.",'lonlatAddError':"Debe proporcionar los valores lon y lat a la función add.",'pixelAddError':"Debe proporcionar los valores x e y a la función add.",'unsupportedGeometryType':"Tipo de geometría no soportada: ${geomType}",'pagePositionFailed':"OpenLayers.Util.pagePosition falló: el elemento con id ${elemId} puede haberse colocado de manera errónea.",'filterEvaluateNotImplemented':"evaluate no está implementado para este tipo de filtro.",'end':''};OpenLayers.Lang.fr={'unhandledRequest':"Requête non gérée, retournant ${statusText}",'permalink':"Permalien",'overlays':"Calques",'baseLayer':"Calque de base",'sameProjection':"La carte de situation ne fonctionne que lorsque sa projection est la même que celle de la carte principale",'readNotImplemented':"Lecture non implémentée.",'writeNotImplemented':"Ecriture non implémentée.",'noFID':"Impossible de mettre à jour un objet sans identifiant (fid).",'errorLoadingGML':"Erreur au chargement du fichier GML ${url}",'browserNotSupported':"Votre navigateur ne supporte pas le rendu vectoriel. Les renderers actuellement supportés sont : \n${renderers}",'componentShouldBe':"addFeatures : le composant devrait être de type ${geomType}",'getFeatureError':"getFeatureFromEvent a été appelé sur un calque sans renderer. Cela signifie généralement que vous "+"avez détruit cette couche, mais que vous avez conservé un handler qui lui était associé.",'minZoomLevelError':"La propriété minZoomLevel doit seulement être utilisée "+"pour des couches FixedZoomLevels-descendent. Le fait que "+"cette couche WFS vérifie la présence de minZoomLevel "+"est une relique du passé. Nous ne pouvons toutefois la "+"supprimer sans casser des applications qui pourraient en dépendre."+" C'est pourquoi nous la déprécions -- la vérification du minZoomLevel "+"sera supprimée en version 3.0. A la place, merci d'utiliser "+"les paramètres de résolutions min/max tel que décrit sur : "+"http://trac.openlayers.org/wiki/SettingZoomLevels",'commitSuccess':"Transaction WFS : SUCCES ${response}",'commitFailed':"Transaction WFS : ECHEC ${response}",'googleWarning':"La couche Google n'a pas été en mesure de se charger correctement.

"+"Pour supprimer ce message, choisissez une nouvelle BaseLayer "+"dans le sélecteur de couche en haut à droite.

"+"Cela est possiblement causé par la non-inclusion de la "+"librairie Google Maps, ou alors parce que la clé de l'API "+"ne correspond pas à votre site.

"+"Développeurs : pour savoir comment corriger ceci, "+"cliquez ici",'getLayerWarning':"La couche ${layerType} n'est pas en mesure de se charger correctement.

"+"Pour supprimer ce message, choisissez une nouvelle BaseLayer "+"dans le sélecteur de couche en haut à droite.

"+"Cela est possiblement causé par la non-inclusion de la "+"librairie ${layerLib}.

"+"Développeurs : pour savoir comment corriger ceci, "+"cliquez ici",'scale':"Echelle ~ 1 : ${scaleDenom}",'layerAlreadyAdded':"Vous avez essayé d'ajouter à la carte le calque : ${layerName}, mais il est déjà présent",'reprojectDeprecated':"Vous utilisez l'option 'reproject' "+"sur la couche ${layerName}. Cette option est dépréciée : "+"Son usage permettait d'afficher des données au dessus de couches raster commerciales."+"Cette fonctionalité est maintenant supportée en utilisant le support de la projection "+"Mercator Sphérique. Plus d'information est disponible sur "+"http://trac.openlayers.org/wiki/SphericalMercator.",'methodDeprecated':"Cette méthode est dépréciée, et sera supprimée à la version 3.0. "+"Merci d'utiliser ${newMethod} à la place.",'boundsAddError':"Vous devez passer les deux valeurs x et y à la fonction add.",'lonlatAddError':"Vous devez passer les deux valeurs lon et lat à la fonction add.",'pixelAddError':"Vous devez passer les deux valeurs x et y à la fonction add.",'unsupportedGeometryType':"Type de géométrie non supporté : ${geomType}",'pagePositionFailed':"OpenLayers.Util.pagePosition a échoué: l'élément d'id ${elemId} pourrait être mal positionné.",'end':''};OpenLayers.Lang.it={'unhandledRequest':"Codice di ritorno della richiesta ${statusText}",'permalink':"Permalink",'overlays':"Overlays",'baseLayer':"Livello base",'sameProjection':"La mini mappa funziona solamente se ha la stessa proiezione della mappa principale",'readNotImplemented':"Lettura non implementata.",'writeNotImplemented':"Scrittura non implementata.",'noFID':"Impossibile aggiornare un elemento grafico che non abbia il FID.",'errorLoadingGML':"Errore nel caricamento del file GML ${url}",'browserNotSupported':"Il tuo browser non supporta il rendering vettoriale. I renderizzatore attualemnte supportati sono:\n${renderers}",'componentShouldBe':"addFeatures : il componente dovrebbe essere di tipo ${geomType}",'getFeatureError':"getFeatureFromEvent chiamata su di un livello senza renderizzatore. Ciò significa che "+"il livello è stato cancellato, ma non i gestori associati ad esso.",'minZoomLevelError':"La proprietà minZoomLevel è da utilizzare solamente "+"con livelli che abbiano FixedZoomLevels. Il fatto che "+"questo livello wfs controlli la proprietà minZoomLevel è "+"un retaggio del passato. Non possiamo comunque rimuoverla "+"senza rompere le vecchie applicazioni che dipendono su di essa."+"Quindi siamo costretti a deprecarla -- minZoomLevel "+"e sarà rimossa dalla vesione 3.0. Si prega di utilizzare i "+"settaggi di risoluzione min/max come descritto qui: "+"http://trac.openlayers.org/wiki/SettingZoomLevels",'commitSuccess':"Transazione WFS: SUCCESS ${response}",'commitFailed':"Transazione WFS: FAILED ${response}",'googleWarning':"Il livello Google non è riuscito a caricare correttamente.

"+"Per evitare questo messaggio, seleziona un nuovo BaseLayer "+"nel selettore di livelli nell'angolo in alto a destra.

"+"Più precisamente, ciò accade perchè la libreria Google Maps "+"non è stata inclusa nella pagina, oppure non contiene la "+"corretta API key per il tuo sito.

"+"Sviluppatori: Per aiuto su come farlo funzionare correttamente, "+"clicca qui",'getLayerWarning':"Il livello ${layerType} non è riuscito a caricare correttamente.

"+"Per evitare questo messaggio, seleziona un nuovo BaseLayer "+"nel selettore di livelli nell'angolo in alto a destra.

"+"Più precisamente, ciò accade perchè la libreria ${layerLib} "+"non è stata inclusa nella pagina.

"+"Sviluppatori: Per aiuto su come farlo funzionare correttamente, "+"clicca qui",'scale':"Scala = 1 : ${scaleDenom}",'layerAlreadyAdded':"Stai cercando di aggiungere il livello: ${layerName} alla mappa, ma tale livello è già stato aggiunto.",'reprojectDeprecated':"Stai utilizzando l'opzione 'reproject' sul livello ${layerName}. "+"Questa opzione è deprecata: il suo utilizzo è stato introdotto per"+"supportare il disegno dei dati sopra mappe commerciali, ma tale "+"funzionalità dovrebbe essere ottenuta tramite l'utilizzo della proiezione "+"Spherical Mercator. Per maggiori informazioni consultare qui "+"http://trac.openlayers.org/wiki/SphericalMercator.",'methodDeprecated':"Questo metodo è stato deprecato e sarà rimosso dalla versione 3.0. "+"Si prega di utilizzare il metodo ${newMethod} in alternativa.",'boundsAddError':"Devi specificare i valori di x e y alla funzione add.",'lonlatAddError':"Devi specificare i valori di lon e lat alla funzione add.",'pixelAddError':"Devi specificare i valori di x e y alla funzione add.",'unsupportedGeometryType':"Tipo di geometria non supportata: ${geomType}",'pagePositionFailed':"OpenLayers.Util.pagePosition fallita: l'elemento con id ${elemId} è posizionato in modo errato.",'end':''};OpenLayers.Lang["pt-BR"]={'unhandledRequest':"A requisição retornou um erro não tratado: ${statusText}",'permalink':"Link para essa página",'overlays':"Camadas de Sobreposição",'baseLayer':"Camada Base",'sameProjection':"O mapa de referência só funciona quando ele está na mesma projeção do mapa principal",'readNotImplemented':"Leitura não implementada.",'writeNotImplemented':"Escrita não implementada.",'noFID':"Não é possível atualizar uma feição que não tenha um FID.",'errorLoadingGML':"Erro ao carregar o arquivo GML ${url}",'browserNotSupported':"Seu navegador não suporta renderização de vetores. Os renderizadores suportados atualmente são:\n${renderers}",'componentShouldBe':"addFeatures: o componente deve ser do tipo ${geomType}",'getFeatureError':"getFeatureFromEvent foi executado mas nenhum renderizador foi encontrado. "+"Isso pode indicar que você destruiu uma camana, mas não o handler associado a ela.",'minZoomLevelError':"A propriedade minZoomLevel é de uso restrito das camadas "+"descendentes de FixedZoomLevels. A verificação dessa propriedade "+"pelas camadas wfs é um resíduo do passado. Não podemos, entretanto "+"não é possível removê-la sem possívelmente quebrar o funcionamento "+"de aplicações OL que possuem depência com ela. Portanto estamos "+"tornando seu uso obsoleto -- a verificação desse atributo será "+"removida na versão 3.0. Ao invés, use as opções de resolução "+"min/max como descrito em: "+"http://trac.openlayers.org/wiki/SettingZoomLevels",'commitSuccess':"Transação WFS : SUCESSO ${response}",'commitFailed':"Transação WFS : ERRO ${response}",'googleWarning':"Não foi possível carregar a camada Google corretamente.

"+"Para se livrar dessa mensagem, selecione uma nova Camada Base, "+"na ferramenta de alternação de camadas localização do canto "+"superior direito.

"+"Muito provavelmente, isso foi causado porque o script da "+"biblioteca do Google Maps não foi incluído, ou porque ele não "+"contém a chave correta da API para o seu site.

"+"Desenvolvedores: Para obter ajuda em solucionar esse problema "+"cliquem aqui",'getLayerWarning':"Não foi possível carregar a camada ${layerType} corretamente.

"+"Para se livrar dessa mensagem, selecione uma nova Camada Base, "+"na ferramenta de alternação de camadas localização do canto "+"superior direito.

"+"Muito provavelmente, isso foi causado porque o script da "+"biblioteca ${layerLib} não foi incluído corretamente.

"+"Desenvolvedores: Para obter ajuda em solucionar esse problema "+"cliquem aqui",'scale':"Escala = 1 : ${scaleDenom}",'layerAlreadyAdded':"Você tentou adicionar a camada: ${layerName} ao mapa, mas ela já foi adicionada",'reprojectDeprecated':"Você está usando a opção 'reproject' na camada ${layerName}. "+"Essa opção está obsoleta: seu uso foi projetado para suportar "+"a visualização de dados sobre bases de mapas comerciais, "+"entretanto essa funcionalidade deve agora ser alcançada usando "+"o suporte à projeção Mercator. Mais informação está disponível em: "+"http://trac.openlayers.org/wiki/SphericalMercator.",'methodDeprecated':"Esse método está obsoleto e será removido na versão 3.0. "+"Ao invés, por favor use ${newMethod}.",'boundsAddError':"Você deve informar ambos os valores x e y para a função add.",'lonlatAddError':"Você deve informar ambos os valores lon e lat para a função add.",'pixelAddError':"Você deve informar ambos os valores x e y para a função add.",'unsupportedGeometryType':"Tipo geométrico não suportado: ${geomType}.",'pagePositionFailed':"OpenLayers.Util.pagePosition falhou: o elemento de id ${elemId} deve estar fora do lugar.",'end':''};OpenLayers.Lang["zh-CN"]={'unhandledRequest':"未处理的请求,返回值为 ${statusText}",'permalink':"永久链接",'overlays':"叠加层",'baseLayer':"基础图层",'sameProjection':"鹰眼地图只有在和主地图使用相同的投影的时候才能正常共工作",'readNotImplemented':"读取功能没有实现。",'writeNotImplemented':"写入功能没有实现。",'noFID':"无法更新feature,缺少FID。",'errorLoadingGML':"加载GML文件 ${url} 出现错误。",'browserNotSupported':"你使用的浏览器不支持矢量渲染。当前支持的渲染方式包括:\n${renderers}",'componentShouldBe':"addFeatures : 组件类型应该是 ${geomType}",'getFeatureError':"getFeatureFromEvent方法在一个没有渲染器的图层上被调用。 这通常意味着您"+"销毁了一个图层,但并未销毁其关联的handler。",'minZoomLevelError':"minZoomLevel属性仅适合用于"+"使用了固定缩放级别的图层。这个 "+"wfs 图层检查 minZoomLevel 是过去遗留下来的。"+"然而,我们不能移除它,"+"而破坏依赖于它的基于OL的应用程序。"+"因此,我们废除了它 -- minZoomLevel "+"将会在3.0中被移除。请改用 "+"min/max resolution 设置,参考:"+"http://trac.openlayers.org/wiki/SettingZoomLevels",'commitSuccess':"WFS Transaction: 成功。 ${response}",'commitFailed':"WFS Transaction: 失败。 ${response}",'googleWarning':"Google图层不能正确加载。

"+"要消除这个信息,请在右上角的"+"图层控制面板中选择其他的基础图层。

"+"这种情况很可能是没有正确的包含Google地图脚本库,"+"或者是没有包含在你的站点上"+"使用的正确的Google Maps API密匙。

"+"开发者:获取使其正确工作的帮助信息,"+"点击这里",'getLayerWarning':"${layerType} 图层不能正确加载。

"+"要消除这个信息,请在右上角的"+"图层控制面板中选择其他的基础图层。

"+"这种情况很可能是没有正确的包含"+"${layerLib} 脚本库。

"+"开发者:获取使其正确工作的帮助信息,"+"点击这里",'scale':"比例尺 = 1 : ${scaleDenom}",'layerAlreadyAdded':"你尝试添加图层: ${layerName} 到地图中,但是它之前就已经被添加。",'reprojectDeprecated':"你正在使用 ${layerName} 图层上的'reproject'选项。"+"这个选项已经不再使用:"+"它是被设计用来支持显示商业的地图数据,"+"不过现在该功能可以通过使用Spherical Mercator来实现。"+"更多信息可以参阅"+"http://trac.openlayers.org/wiki/SphericalMercator.",'methodDeprecated':"该方法已经不再被支持,并且将在3.0中被移除。"+"请使用 ${newMethod} 方法来替代。",'boundsAddError':"您必须传递 x 和 y 两个参数值到 add 方法。",'lonlatAddError':"您必须传递 lon 和 lat 两个参数值到 add 方法。",'pixelAddError':"您必须传递 x and y 两个参数值到 add 方法。",'unsupportedGeometryType':"不支持的几何体类型: ${geomType}",'pagePositionFailed':"OpenLayers.Util.pagePosition 失败:id 为 ${elemId} 的元素可能被错置。",'end':''};OpenLayers.Lang["zh-TW"]={'unhandledRequest':"未處理的請求,傳回值為 ${statusText}。",'permalink':"永久連結",'overlays':"額外圖層",'baseLayer':"基礎圖層",'sameProjection':"地圖縮覽(OverviewMap)只能在跟主地圖相同投影時起作用。",'readNotImplemented':"沒有實作讀取的功能。",'writeNotImplemented':"沒有實作寫入的功能。",'noFID':"因為沒有 FID 所以無法更新 feature。",'errorLoadingGML':"讀取GML檔案 ${url} 錯誤。",'browserNotSupported':"您的瀏覽器未支援向量渲染. 目前支援的渲染方式是:\n${renderers}",'componentShouldBe':"addFeatures : 元件應該為 ${geomType}",'getFeatureError':"getFeatureFromEvent 在一個沒有被渲染的圖層裡被呼叫。這通常意味著您 "+"摧毀了一個圖層,但並未摧毀相關的handler。",'minZoomLevelError':"minZoomLevel 屬性僅適合用在 "+"FixedZoomLevels-descendent 類型的圖層. 這個"+"wfs layer 的 minZoomLevel 是過去所遺留下來的,"+"然而我們不能移除它而不讓它將"+"過去的程式相容性給破壞掉。"+"因此我們將會迴避使用它 -- minZoomLevel "+"會在3.0被移除,請改"+"用在這邊描述的 min/max resolution 設定: "+"http://trac.openlayers.org/wiki/SettingZoomLevels",'commitSuccess':"WFS Transaction: 成功 ${response}",'commitFailed':"WFS Transaction: 失敗 ${response}",'googleWarning':"The Google Layer 圖層無法被正確的載入。

"+"要迴避這個訊息, 請在右上角的圖層改變器裡,"+"選一個新的基礎圖層。

"+"很有可能是因為 Google Maps 的函式庫"+"腳本沒有被正確的置入,或沒有包含 "+"您網站上正確的 API key

"+"開發者: 要幫助這個行為正確完成,"+"請按這裡",'getLayerWarning':"${layerType} 圖層無法被正確的載入。

"+"要迴避這個訊息, 請在右上角的圖層改變器裡,"+"選一個新的基礎圖層。

"+"很有可能是因為 ${layerLib} 的函式庫"+"腳本沒有被正確的置入。

"+"開發者: 要幫助這個行為正確完成,"+"請按這裡",'scale':"Scale = 1 : ${scaleDenom}",'layerAlreadyAdded':"你試著新增圖層: ${layerName} 到地圖上,但圖層之前就已經被新增了。",'reprojectDeprecated':"你正使用 'reproject' 這個選項 "+"在 ${layerName} 層。這個選項已經不再使用:"+"它的使用原本是設計用來支援在商業地圖上秀出資料,"+"但這個功能已經被"+"Spherical Mercator所取代。更多的資訊可以在 "+"http://trac.openlayers.org/wiki/SphericalMercator 找到。",'methodDeprecated':"這個方法已經不再使用且在3.0將會被移除,"+"請使用 ${newMethod} 來代替。",'boundsAddError':"您必須傳入 x 跟 y 兩者的值進 add 函數。",'lonlatAddError':"您必須傳入 lon 跟 lat 兩者的值進 add 函數。",'pixelAddError':"您必須傳入 x 跟 y 兩者的值進 add 函數。",'unsupportedGeometryType':"未支援的幾何型別: ${geomType}。",'pagePositionFailed':"OpenLayers.Util.pagePosition 失敗: id ${elemId} 的 element 可能被錯置。",'end':''};OpenLayers.Popup.AnchoredBubble=OpenLayers.Class(OpenLayers.Popup.Anchored,{rounded:false,initialize:function(id,lonlat,contentSize,contentHTML,anchor,closeBox,closeBoxCallback){this.padding=new OpenLayers.Bounds(0,OpenLayers.Popup.AnchoredBubble.CORNER_SIZE,0,OpenLayers.Popup.AnchoredBubble.CORNER_SIZE);OpenLayers.Popup.Anchored.prototype.initialize.apply(this,arguments);},draw:function(px){OpenLayers.Popup.Anchored.prototype.draw.apply(this,arguments);this.setContentHTML();this.setBackgroundColor();this.setOpacity();return this.div;},updateRelativePosition:function(){this.setRicoCorners();},setSize:function(contentSize){OpenLayers.Popup.Anchored.prototype.setSize.apply(this,arguments);this.setRicoCorners();},setBackgroundColor:function(color){if(color!=undefined){this.backgroundColor=color;} -if(this.div!=null){if(this.contentDiv!=null){this.div.style.background="transparent";OpenLayers.Rico.Corner.changeColor(this.groupDiv,this.backgroundColor);}}},setOpacity:function(opacity){OpenLayers.Popup.Anchored.prototype.setOpacity.call(this,opacity);if(this.div!=null){if(this.groupDiv!=null){OpenLayers.Rico.Corner.changeOpacity(this.groupDiv,this.opacity);}}},setBorder:function(border){this.border=0;},setRicoCorners:function(){var corners=this.getCornersToRound(this.relativePosition);var options={corners:corners,color:this.backgroundColor,bgColor:"transparent",blend:false};if(!this.rounded){OpenLayers.Rico.Corner.round(this.div,options);this.rounded=true;}else{OpenLayers.Rico.Corner.reRound(this.groupDiv,options);this.setBackgroundColor();this.setOpacity();}},getCornersToRound:function(){var corners=['tl','tr','bl','br'];var corner=OpenLayers.Bounds.oppositeQuadrant(this.relativePosition);OpenLayers.Util.removeItem(corners,corner);return corners.join(" ");},CLASS_NAME:"OpenLayers.Popup.AnchoredBubble"});OpenLayers.Popup.AnchoredBubble.CORNER_SIZE=5;OpenLayers.Projection=OpenLayers.Class({proj:null,projCode:null,initialize:function(projCode,options){OpenLayers.Util.extend(this,options);this.projCode=projCode;if(window.Proj4js){this.proj=new Proj4js.Proj(projCode);}},getCode:function(){return this.proj?this.proj.srsCode:this.projCode;},getUnits:function(){return this.proj?this.proj.units:null;},toString:function(){return this.getCode();},equals:function(projection){if(projection&&projection.getCode){return this.getCode()==projection.getCode();}else{return false;}},destroy:function(){delete this.proj;delete this.projCode;},CLASS_NAME:"OpenLayers.Projection"});OpenLayers.Projection.transforms={};OpenLayers.Projection.addTransform=function(from,to,method){if(!OpenLayers.Projection.transforms[from]){OpenLayers.Projection.transforms[from]={};} +if(this.div!=null){if(this.contentDiv!=null){this.div.style.background="transparent";OpenLayers.Rico.Corner.changeColor(this.groupDiv,this.backgroundColor);}}},setOpacity:function(opacity){OpenLayers.Popup.Anchored.prototype.setOpacity.call(this,opacity);if(this.div!=null){if(this.groupDiv!=null){OpenLayers.Rico.Corner.changeOpacity(this.groupDiv,this.opacity);}}},setBorder:function(border){this.border=0;},setRicoCorners:function(){var corners=this.getCornersToRound(this.relativePosition);var options={corners:corners,color:this.backgroundColor,bgColor:"transparent",blend:false};if(!this.rounded){OpenLayers.Rico.Corner.round(this.div,options);this.rounded=true;}else{OpenLayers.Rico.Corner.reRound(this.groupDiv,options);this.setBackgroundColor();this.setOpacity();}},getCornersToRound:function(){var corners=['tl','tr','bl','br'];var corner=OpenLayers.Bounds.oppositeQuadrant(this.relativePosition);OpenLayers.Util.removeItem(corners,corner);return corners.join(" ");},CLASS_NAME:"OpenLayers.Popup.AnchoredBubble"});OpenLayers.Popup.AnchoredBubble.CORNER_SIZE=5;OpenLayers.Popup.Framed=OpenLayers.Class(OpenLayers.Popup.Anchored,{imageSrc:null,imageSize:null,isAlphaImage:false,positionBlocks:null,blocks:null,fixedRelativePosition:false,initialize:function(id,lonlat,contentSize,contentHTML,anchor,closeBox,closeBoxCallback){OpenLayers.Popup.Anchored.prototype.initialize.apply(this,arguments);if(this.fixedRelativePosition){this.updateRelativePosition();this.calculateRelativePosition=function(px){return this.relativePosition;};} +this.contentDiv.style.position="absolute";this.contentDiv.style.zIndex=1;if(closeBox){this.closeDiv.style.zIndex=1;} +this.groupDiv.style.position="absolute";this.groupDiv.style.top="0px";this.groupDiv.style.left="0px";this.groupDiv.style.height="100%";this.groupDiv.style.width="100%";},destroy:function(){this.imageSrc=null;this.imageSize=null;this.isAlphaImage=null;this.fixedRelativePosition=false;this.positionBlocks=null;for(var i=0;i=-this.MAX_PIXEL&&left<=this.MAX_PIXEL&&top>=-this.MAX_PIXEL&&top<=this.MAX_PIXEL);},setExtent:function(extent,resolutionChanged){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var resolution=this.getResolution();var left=-extent.left/resolution;var top=extent.top/resolution;if(resolutionChanged){this.left=left;this.top=top;var extentString="0 0 "+this.size.w+" "+this.size.h;this.rendererRoot.setAttributeNS(null,"viewBox",extentString);this.translate(0,0);return true;}else{var inRange=this.translate(left-this.left,top-this.top);if(!inRange){this.setExtent(extent,true);} @@ -675,7 +686,7 @@ return viewPortPx;},getLayerPxFromViewPortPx:function(viewPortPx){var layerPx=nu return layerPx;},getLonLatFromLayerPx:function(px){px=this.getViewPortPxFromLayerPx(px);return this.getLonLatFromViewPortPx(px);},getLayerPxFromLonLat:function(lonlat){var px=this.getPixelFromLonLat(lonlat);return this.getLayerPxFromViewPortPx(px);},CLASS_NAME:"OpenLayers.Map"});OpenLayers.Map.TILE_WIDTH=256;OpenLayers.Map.TILE_HEIGHT=256;OpenLayers.Marker=OpenLayers.Class({icon:null,lonlat:null,events:null,map:null,initialize:function(lonlat,icon){this.lonlat=lonlat;var newIcon=(icon)?icon:OpenLayers.Marker.defaultIcon();if(this.icon==null){this.icon=newIcon;}else{this.icon.url=newIcon.url;this.icon.size=newIcon.size;this.icon.offset=newIcon.offset;this.icon.calculateOffset=newIcon.calculateOffset;} this.events=new OpenLayers.Events(this,this.icon.imageDiv,null);},destroy:function(){this.erase();this.map=null;this.events.destroy();this.events=null;if(this.icon!=null){this.icon.destroy();this.icon=null;}},draw:function(px){return this.icon.draw(px);},erase:function(){if(this.icon!=null){this.icon.erase();}},moveTo:function(px){if((px!=null)&&(this.icon!=null)){this.icon.moveTo(px);} this.lonlat=this.map.getLonLatFromLayerPx(px);},isDrawn:function(){var isDrawn=(this.icon&&this.icon.isDrawn());return isDrawn;},onScreen:function(){var onScreen=false;if(this.map){var screenBounds=this.map.getExtent();onScreen=screenBounds.containsLonLat(this.lonlat);} -return onScreen;},inflate:function(inflate){if(this.icon){var newSize=new OpenLayers.Size(this.icon.size.w*inflate,this.icon.size.h*inflate);this.icon.setSize(newSize);}},setOpacity:function(opacity){this.icon.setOpacity(opacity);},setUrl:function(url){this.icon.setUrl(url);},display:function(display){this.icon.display(display);},CLASS_NAME:"OpenLayers.Marker"});OpenLayers.Marker.defaultIcon=function(){var url=OpenLayers.Util.getImagesLocation()+"marker.png";var size=new OpenLayers.Size(21,25);var calculateOffset=function(size){return new OpenLayers.Pixel(-(size.w/2),-size.h);};return new OpenLayers.Icon(url,size,null,calculateOffset);};OpenLayers.Request={DEFAULT_CONFIG:{method:"GET",url:window.location.href,async:true,user:undefined,password:undefined,params:null,proxy:OpenLayers.ProxyHost,headers:{},data:null,callback:function(){},success:null,failure:null,scope:null},events:new OpenLayers.Events(this,null,["complete","success","failure"]),issue:function(config){var defaultConfig=OpenLayers.Util.extend(this.DEFAULT_CONFIG,{proxy:OpenLayers.ProxyHost});config=OpenLayers.Util.applyDefaults(config,defaultConfig);var request=new OpenLayers.Request.XMLHttpRequest();var url=config.url;if(config.params){var paramString=OpenLayers.Util.getParameterString(config.params);if(paramString.length>0){var separator=(url.indexOf('?')>-1)?'&':'?';url+=separator+paramString;}} +return onScreen;},inflate:function(inflate){if(this.icon){var newSize=new OpenLayers.Size(this.icon.size.w*inflate,this.icon.size.h*inflate);this.icon.setSize(newSize);}},setOpacity:function(opacity){this.icon.setOpacity(opacity);},setUrl:function(url){this.icon.setUrl(url);},display:function(display){this.icon.display(display);},CLASS_NAME:"OpenLayers.Marker"});OpenLayers.Marker.defaultIcon=function(){var url=OpenLayers.Util.getImagesLocation()+"marker.png";var size=new OpenLayers.Size(21,25);var calculateOffset=function(size){return new OpenLayers.Pixel(-(size.w/2),-size.h);};return new OpenLayers.Icon(url,size,null,calculateOffset);};OpenLayers.Popup.FramedCloud=OpenLayers.Class(OpenLayers.Popup.Framed,{contentDisplayClass:"olFramedCloudPopupContent",autoSize:true,panMapIfOutOfView:true,imageSize:new OpenLayers.Size(676,736),isAlphaImage:false,fixedRelativePosition:false,positionBlocks:{"tl":{'offset':new OpenLayers.Pixel(44,0),'padding':new OpenLayers.Bounds(8,40,8,9),'blocks':[{size:new OpenLayers.Size('auto','auto'),anchor:new OpenLayers.Bounds(0,51,22,0),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,'auto'),anchor:new OpenLayers.Bounds(null,50,0,0),position:new OpenLayers.Pixel(-638,0)},{size:new OpenLayers.Size('auto',19),anchor:new OpenLayers.Bounds(0,32,22,null),position:new OpenLayers.Pixel(0,-631)},{size:new OpenLayers.Size(22,18),anchor:new OpenLayers.Bounds(null,32,0,null),position:new OpenLayers.Pixel(-638,-632)},{size:new OpenLayers.Size(81,35),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(0,-688)}]},"tr":{'offset':new OpenLayers.Pixel(-45,0),'padding':new OpenLayers.Bounds(8,40,8,9),'blocks':[{size:new OpenLayers.Size('auto','auto'),anchor:new OpenLayers.Bounds(0,51,22,0),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,'auto'),anchor:new OpenLayers.Bounds(null,50,0,0),position:new OpenLayers.Pixel(-638,0)},{size:new OpenLayers.Size('auto',19),anchor:new OpenLayers.Bounds(0,32,22,null),position:new OpenLayers.Pixel(0,-631)},{size:new OpenLayers.Size(22,19),anchor:new OpenLayers.Bounds(null,32,0,null),position:new OpenLayers.Pixel(-638,-631)},{size:new OpenLayers.Size(81,35),anchor:new OpenLayers.Bounds(0,0,null,null),position:new OpenLayers.Pixel(-215,-687)}]},"bl":{'offset':new OpenLayers.Pixel(45,0),'padding':new OpenLayers.Bounds(8,9,8,40),'blocks':[{size:new OpenLayers.Size('auto','auto'),anchor:new OpenLayers.Bounds(0,21,22,32),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,'auto'),anchor:new OpenLayers.Bounds(null,21,0,32),position:new OpenLayers.Pixel(-638,0)},{size:new OpenLayers.Size('auto',21),anchor:new OpenLayers.Bounds(0,0,22,null),position:new OpenLayers.Pixel(0,-629)},{size:new OpenLayers.Size(22,21),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(-638,-629)},{size:new OpenLayers.Size(81,33),anchor:new OpenLayers.Bounds(null,null,0,0),position:new OpenLayers.Pixel(-101,-674)}]},"br":{'offset':new OpenLayers.Pixel(-44,0),'padding':new OpenLayers.Bounds(8,9,8,40),'blocks':[{size:new OpenLayers.Size('auto','auto'),anchor:new OpenLayers.Bounds(0,21,22,32),position:new OpenLayers.Pixel(0,0)},{size:new OpenLayers.Size(22,'auto'),anchor:new OpenLayers.Bounds(null,21,0,32),position:new OpenLayers.Pixel(-638,0)},{size:new OpenLayers.Size('auto',21),anchor:new OpenLayers.Bounds(0,0,22,null),position:new OpenLayers.Pixel(0,-629)},{size:new OpenLayers.Size(22,21),anchor:new OpenLayers.Bounds(null,0,0,null),position:new OpenLayers.Pixel(-638,-629)},{size:new OpenLayers.Size(81,33),anchor:new OpenLayers.Bounds(0,null,null,0),position:new OpenLayers.Pixel(-311,-674)}]}},minSize:new OpenLayers.Size(105,10),maxSize:new OpenLayers.Size(600,660),initialize:function(id,lonlat,contentSize,contentHTML,anchor,closeBox,closeBoxCallback){this.imageSrc=OpenLayers.Util.getImagesLocation()+'cloud-popup-relative.png';OpenLayers.Popup.Framed.prototype.initialize.apply(this,arguments);this.contentDiv.className=this.contentDisplayClass;},destroy:function(){OpenLayers.Popup.Framed.prototype.destroy.apply(this,arguments);},CLASS_NAME:"OpenLayers.Popup.FramedCloud"});OpenLayers.Request={DEFAULT_CONFIG:{method:"GET",url:window.location.href,async:true,user:undefined,password:undefined,params:null,proxy:OpenLayers.ProxyHost,headers:{},data:null,callback:function(){},success:null,failure:null,scope:null},events:new OpenLayers.Events(this,null,["complete","success","failure"]),issue:function(config){var defaultConfig=OpenLayers.Util.extend(this.DEFAULT_CONFIG,{proxy:OpenLayers.ProxyHost});config=OpenLayers.Util.applyDefaults(config,defaultConfig);var request=new OpenLayers.Request.XMLHttpRequest();var url=config.url;if(config.params){var paramString=OpenLayers.Util.getParameterString(config.params);if(paramString.length>0){var separator=(url.indexOf('?')>-1)?'&':'?';url+=separator+paramString;}} if(config.proxy&&(url.indexOf("http")==0)){url=config.proxy+encodeURIComponent(url);} request.open(config.method,url,config.async,config.user,config.password);for(var header in config.headers){request.setRequestHeader(header,config.headers[header]);} var complete=(config.scope)?OpenLayers.Function.bind(config.callback,config.scope):config.callback;var success;if(config.success){success=(config.scope)?OpenLayers.Function.bind(config.success,config.scope):config.success;} diff --git a/public/stylesheets/common.css b/public/stylesheets/common.css index 10e335143..c42495718 100644 --- a/public/stylesheets/common.css +++ b/public/stylesheets/common.css @@ -560,6 +560,17 @@ hr { display: inline !important; } +/* Rules for user popups on maps */ + +.user_popup p { + padding-top: 3px; + padding-bottom: 3px; + margin-top: 0px; + margin-bottom: 0px; + margin-left: 55px; + margin-right: 2px; +} + /* Rules for message in/out box page */ #messages { -- 2.43.2