Shadin | 21 May 2013 10:31
Picon
Favicon

WMSgetFeatureInfo ProxyHost

Does WMSGetFeatureInfo need a proxyhost to allow remote server accessing the
data? I use ProxyHost to allow WFS requests, but seems not working with
WMSGetFeatureInfo. the local machines retrieves data from GeoServer
successfully but external machines doesn't!

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMSgetFeatureInfo-ProxyHost-tp5054544.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
yassine bouderaa | 21 May 2013 03:00
Picon

Symbol and Classification

Hi.
I need your help in changing symbols of a vector layer and do a classification based on a population field in postgresSQL.
I'm using Geoserver and postgresSQL.

---------------------------------------------------------------
_______________________________________________
Users mailing list
Users@...
http://lists.osgeo.org/mailman/listinfo/openlayers-users
xenos | 20 May 2013 20:21
Picon

opening popup through clicking on symbol

Hello,

I'm trying to find a way (and first an example because I'm quite a beginner
with JavaŚcript and OpenLayers) to use a popup in the map by clicking on the
icon of a WMS point layer.
I've only found examples which has used polygons to demonstrate how it
works, like this one:
http://openlayers.org/dev/examples/getfeatureinfo-popup.html

Maybe it should be obvious how to use it for the icons but unfortunately not
for a beginner like me...

Does somebody have maybe an example or an advice for me?

Thx a lot!

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/opening-popup-through-clicking-on-symbol-tp5054463.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
Users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Shadin | 20 May 2013 09:02
Picon
Favicon

Staring issue with WMS and public IP

I'm facing a strange problem with my application (Openlayers). It works with
private IP but not with public IP !! Everything was fine when I was using
WFS/Vector. but since I switch to WMS, problem showed up!! seems like it
couldn't retrieve layers from Geoserver. Locally, it's okay but using puplic
IP it's not!

Note: My src is on port 80 and GeoServer is on port 8080

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Staring-issue-with-WMS-and-public-IP-tp5054321.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
islanis | 18 May 2013 20:53
Picon
Favicon

PHP , Geoserver 2.2, CURL and j_spring_security_check

hello peoples, i need help, i got a problem, i need to auntenticate  
throught php in geoserver, in the past with the version geoserver  
2.1.4 it work fine, but now i want to upgrade my map server to  
geoserver 2.2 and the function dont work here, i dont know what to do,  
help me please, here is the full function that i used and error that  
geoserver 2.2 show, thanks to all.

public static function loginGeoserver($username, $password)
     {
         $post_data['username'] = $username;
         $post_data['password'] = $password;
         foreach ($post_data as $key => $value) {
             $post_items[] = $key . '=' . $value;
         }
         $post_string = implode('&', $post_items);
         $curl_connection = curl_init('http://' . master::$host .
             '/geoserver/j_spring_security_check');
         curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30);
         curl_setopt($curl_connection, CURLOPT_USERAGENT,
             "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
         curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true);
         curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false);
         curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1);
         curl_setopt($curl_connection, CURLOPT_POSTFIELDS, $post_string);
         $result = curl_exec($curl_connection);
         $arrInfo = curl_getinfo($curl_connection);
         $url = $arrInfo['url'];
         parse_str($url, $output);
         $trans = array("." => "_");
         $base = strtr(master::$host, $trans);

         if (master::getLoggedUser() != null) {
             if (master::getLoggedUser()->tieneRol("Operador"))
                 $str = "http://" . $base . "/geoserver/web/;jsessionid";
             $str = "http://" . $base . "/geoserver/;jsessionid";

             curl_close($curl_connection);
             if (!empty($output[$str])) {
             } else {
                 //header('Location:  
/geoportal/index.php?page=home.home&Error=GeoserverDown');
				header('Location: /personal/index.php?page=inicio&Error=GeoserverDown');
             }
             setcookie('JSESSIONID', $output[$str], 0, '/geoserver');
             setcookie('JSESSIONID', $output[$str], 0, '/');
         } else {
             return null;
         }

     }
-------------------------------------------------------
and the geoserver 2.2 logs show this
-----------------------------------------------------
2013-05-17 22:37:48,863 INFO [ows.OWSHandlerMapping] - Mapped URL path  
[/animate/*] onto handler 'dispatcher'
2013-05-17 22:37:49,861 WARN [geoserver.security] -  
E:\geoserver-2.2-RC1-bin\data_dir\security\users.properties.old could  
be removed manually
2013-05-17 22:46:23,167 INFO [geoserver.filters] - Creating a new http  
session outside of the web UI! (normally not desirable), the path  
is/j_spring_security_check
java.lang.Exception: Full stack trace for the session creation path
	at  
org.geoserver.filters.SessionDebugFilter$SessionDebugWrapper.getSession(SessionDebugFilter.java:93)
	at  
javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:227)
	at  
org.springframework.security.web.context.HttpSessionSecurityContextRepository$SaveToSessionResponseWrapper.createNewSessionIfAllowed(HttpSessionSecurityContextRepository.java:339)
	at

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

--

Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el
cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el
compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas

Infomed: http://www.sld.cu/
Nick Karnik | 17 May 2013 22:36

Controling cache size and storage location for CacheWrite

Hello,

 

I’m using the CacheWrite control and running into an issue with the Local Storage filling up quickly so I was wondering if any of the following are possible in the current 2.13 codebase:

 

1.       Can I limit the amount of space reserved for the OL Cache? I’m using LocalStorage for storing other data in my application and running out of space pretty quickly due to the map cache. I know I can clear the MapCache when that happens, but that’s my last resort.

2.       Can I configure the CacheWrite control to use Session Storage/IndexedDB instead of the Local Storage?

3.       What about having OL cache use an in-memory cache?

 

Are there any work around for this issue other than using IndexedDB or clearing the map cache?

 

Thanks,

 

Nick Karnik
Software Engineer, EMOD
nkarnik-iX29Yf8O3ULQT0dZR+AlfA@public.gmane.org
T - 425.691.2772
F - 425.467.2350

 

This message may contain confidential information which may also be legally privileged information. If you are not an intended recipient of the message, please delete it and notify the sender via reply email. 

Any unauthorized dissemination, distribution or copying of the material in this message, and any attachments to the message, is strictly forbidden.

 

_______________________________________________
Users mailing list
Users@...
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Samuel Gilbert | 17 May 2013 17:06
Picon
Favicon

How to refresh a layer being displayed?

Hello,

  I am displaying a few layers containing some data that change over time (ie. 
Weather Radar).  Is there a way to ask OpenLayers to fetch the up-to-date 
tiles from the server?  The same GetMap request will respond different tiles 
at different points in time.

  So far, the only solution I found is to delete the layer and create a new 
one with the exact same properties.  This isn't very nice; is there a better 
way to do this?

Samuel
Diego M. | 17 May 2013 10:40
Picon
Favicon

Different Styles Within Vector Layer

Is there any way to configure OpenLayers styling method? I have a vector
layer and I would like to style the features depending on a value of a flag
variables, so I can't use rules. Lets say I have two types of features:
houses and restaurants. houses flag is "H" and restaurants flag is "R". How
can I give them a different style within a vector layer?

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Different-Styles-Within-Vector-Layer-tp5053915.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Rob Hyx | 16 May 2013 19:52
Picon
Gravatar

StyleMap breaks Modify Feature example in IE 8

Hello all, I'm trying to get my custom StyleMap to work with the Modify Feature example that comes with OpenLayers 2.12. Without the label attribute it seems to work fine in IE 8.0.7601 (I can select and drag the features around), but with the label being displayed I can sometimes select, but not modify the features. Any ideas?

I know, I know, upgrade my browser. Unfortunately that's not an option.

Thanks in advance. Below is the relevant code:

var map, vectors, controls;
        function init(){
            map = new OpenLayers.Map('map');
            var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
                "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'});

            var myStyles = new OpenLayers.StyleMap({
                "default": new OpenLayers.Style({
                    label:'ASDF',
                    strokeColor: "#00FF00",
                    strokeOpacity: 1,
                    strokeWidth: 3,
                    fillColor: "#FF5500",
                    fillOpacity: 0.5,
                    pointRadius: 6,
                    pointerEvents: "visiblePainted"
                })
            });
            var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;
            renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;

            vectors = new OpenLayers.Layer.Vector("Vector Layer", {
                renderers: renderer,
                styleMap: myStyles
            });

            map.addLayers([wms, vectors]);
            map.addControl(new OpenLayers.Control.LayerSwitcher());
            map.addControl(new OpenLayers.Control.MousePosition());
           
            controls = {
                point: new OpenLayers.Control.DrawFeature(vectors,
                            OpenLayers.Handler.Point),
                line: new OpenLayers.Control.DrawFeature(vectors,
                            OpenLayers.Handler.Path),
                polygon: new OpenLayers.Control.DrawFeature(vectors,
                            OpenLayers.Handler.Polygon),
                regular: new OpenLayers.Control.DrawFeature(vectors,
                            OpenLayers.Handler.RegularPolygon,
                            {handlerOptions: {sides: 5}}),
                modify: new OpenLayers.Control.ModifyFeature(vectors)
            };
           
            for(var key in controls) {
                map.addControl(controls[key]);
            }
           
            map.setCenter(new OpenLayers.LonLat(0, 0), 3);
            document.getElementById('noneToggle').checked = true;
        }
       
        function update() {
            // reset modification mode
            controls.modify.mode = OpenLayers.Control.ModifyFeature.RESHAPE;
            var rotate = document.getElementById("rotate").checked;
            if(rotate) {
                controls.modify.mode |= OpenLayers.Control.ModifyFeature.ROTATE;
            }
            var resize = document.getElementById("resize").checked;
            if(resize) {
                controls.modify.mode |= OpenLayers.Control.ModifyFeature.RESIZE;
                var keepAspectRatio = document.getElementById("keepAspectRatio").checked;
                if (keepAspectRatio) {
                    controls.modify.mode &= ~OpenLayers.Control.ModifyFeature.RESHAPE;
                }
            }
            var drag = document.getElementById("drag").checked;
            if(drag) {
                controls.modify.mode |= OpenLayers.Control.ModifyFeature.DRAG;
            }
            if (rotate || drag) {
                controls.modify.mode &= ~OpenLayers.Control.ModifyFeature.RESHAPE;
            }
            controls.modify.createVertices = document.getElementById("createVertices").checked;
            var sides = parseInt(document.getElementById("sides").value);
            sides = Math.max(3, isNaN(sides) ? 0 : sides);
            controls.regular.handler.sides = sides;
            var irregular =  document.getElementById("irregular").checked;
            controls.regular.handler.irregular = irregular;
        }

        function toggleControl(element) {
            for(key in controls) {
                var control = controls[key];
                if(element.value == key && element.checked) {
                    control.activate();
                } else {
                    control.deactivate();
                }
            }
        }
_______________________________________________
Users mailing list
Users@...
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Xavier Mamano (jorix | 16 May 2013 17:52
Picon
Gravatar

Improvements on MeodifyFeature (OL2 outside)

Hi all,

I wanted to present the improvements on MeodifyFeature that I have
developed:

Features:

    * Use icons to identify the tools (rotate, resize ...)
    * Configurable styles to show the tools and vertices (independent of the
layer styleMap)
    * Separate representation for each tool (rotate, resize ...)
    * New tool to delete a feature that have been selected for modification.
    * Cancel a drag pressing esc-key.
    * Allows add custom tools (eg drag a angle attribute of a point)

Try it on:

  http://jorix.github.io/OL-Ragbag/examples/modify-feature.html

Feel free to use this code and express opinions about it.

(currently this proposal is not part of the standard OL2 code)

NOTE: I started the code based on the excellent work
      done in: https://github.com/openlayers/openlayers/pull/913

Regards,

Xavier Mamano

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Improvements-on-MeodifyFeature-OL2-outside-tp5053746.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Luís de Sousa | 16 May 2013 17:10
Picon
Gravatar

How to display WFS layer from MapServer?

Dear all, 

I have MapServer serving a simple polygon layer defined in this way: 

  LAYER 
    NAME "buildings_gml"
    TYPE POLYGON
    CONNECTIONTYPE OGR
    CONNECTION "/var/sampleData/BuildingsFull.gml"
    STATUS ON
    DUMP TRUE 

    PROJECTION
      "init=epsg:28992"
    END

    METADATA
      "ows_title" "Building footprints"
      "ows_abstract" "Data set of building footprints"
      "gml_include_items" "all"  
      "ows_featureid" "cat" 
    END

    CLASS
     NAME "building_footprints"
     OUTLINECOLOR 255 0 0
    END    
  END

I can access this layer with QGis using both the WFS and WMS protocols. I'd
like to display it as a WFS layer in an OL map; I'm using this set up:

	buildsWFS = new OpenLayers.Layer.Vector("BuildingsWFS", {
        strategies: [new OpenLayers.Strategy.Fixed()],
        projection: new OpenLayers.Projection("EPSG:28992"),
        protocol: new OpenLayers.Protocol.WFS({
            url:
"http://myServer/cgi-bin/mapserv?map=/var/www/MapFiles/test.map",
            featureType: "buildings_gml",
            featureNS: "http://mapserver.gis.umn.edu/mapserver"
            srsName: "EPSG:28992",
        })
    });

When I add this layer to the map object I don't get any JS errors back but
no requests are issued to the server and hence nothing shows up in the map.

Using a WMS layer object I can display this layer without issue, using this
set up:

	buildsWMS =  new OpenLayers.Layer.WMS(
    	"BuildingsWMS",
    	"http://myServer/cgi-bin/mapserv?map=/var/www/MapFiles/test.map",
        {layers: "buildings_gml", 
         format: "image/png",
         srsName: "EPSG:28992",
	 	 transparent: "true",
     	 projection: new OpenLayers.Projection("EPSG:28992")},
        {isBaseLayer: false,  
     	 visibility: true}
    );

I understand that displaying WFS layers from MapServer poses regular
difficulties, but even after going through several threads [1,2,3,4] with
similar problems I still can't find what is wrong in my case.

Any help appreciated, Thank
you,

Luís

[1]
http://lists.osgeo.org/pipermail/openlayers-users/2011-May/thread.html#20574

[2]
http://gis.stackexchange.com/questions/57545/why-is-mapserver-layer-not-showing-up-in-openlayers

[3]
http://stackoverflow.com/questions/14477019/wfs-mapserver-layer-not-showing-up-in-openlayers

[4]
http://gis.stackexchange.com/questions/26627/set-up-wfs-service-on-mapserver-and-display-in-openlayers 

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/How-to-display-WFS-layer-from-MapServer-tp5053728.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
Users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Gmane