Wolfgang Wienke | 20 Nov 21:10 2014
Picon
Picon

circles

Hi,
sorry for crying for attention.
I had 3 posts with no answer.

Is this list ONLY for OpenLayers V2?
If not my question:

I try to show circles on a map with a bing "Aerial"-Layer.
In OpenLayers V3 the examples are working fine.
But when i change the WMS-layer in the example to the bing layer, the 
circle is no longer displayed.
In Open layers V2, the circle is only shown on a base layer. It does not 
show on a Bing Layer.
Is this a feature, or where are my mistakes?
--

-- 
                                mit freundlichen Grüssen

                                      Wolfgang Wienke
Wolfgang Wienke | 20 Nov 17:41 2014
Picon
Picon

Anyore reading me?

Hi, can somesend an answer, just to get sure I*m beeinbg read!

--

-- 
                                mit freundlichen Grüssen

                                      Wolfgang Wienke
Staav Per-Anders | 20 Nov 09:30 2014

GetFeaturInfo call failing in IE11

I am new to this mailing list, but we have been using OpenLayers for a while.

 

Currently I am struggling with a problem with GetFeatureInfo and IE11 and I decided to share my experiences to hopefully help some other poor fellow to have to do the same analysis.

 

I am using 2.13.1 of OpenLayers and GeoServer 2.4 and have applied a couple of fixes to get it to work in IE11 for WFS calls and similar. Unfortunately I cannot sort out the GetFeatureInfo calls.

 

If I IE11 in Edge mode the call to OpenLayers.Format.XML.prototype.read.apply(this, [data]); eventually resolve into xmldom.loadXML(text) call failing and then  a failed call to new DOMParser().parseFromString(text, 'text/xml')

 

If I use IE11 and emulate previous versions (aka Quirks mode) the call to loadXML succeed even through I used the debugger to verify that in both cases the actual text sent into the function is JSON

"{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"id\":\"LVD_FUNCTION_OBJECT_VIEW.3010124\",\"geometry\":{\"type\":\"LineString\",\"coordinates\":[[154111.811179288,6578422.01790236,0],[154111.295167272,6578428.93449788,0],[154112.323003077,6578434.88642851,0],[154119.436625185,6578454.94173547,0],[154127.927454092,6578478.22225933,0],[154130.750467693,6578486.2847629,0],[154131.816409608,6578490.96371858,0],[154130.856751895,6578508.97999902,0]]},\"geometry_name\":\"GEOLOC\",\"properties\":{\"FUNCTION_OBJECT_NO\":9112,\"FUNCTION_OBJECT_NAME\":\"Västra Terrassrampen (1) (Norra Järngraven - Katarinavägen) (050508 - 020644)\",\"TRAFFIC_TYPES\":1}}],\"crs\":{\"type\":\"EPSG\",\"properties\":{\"code\":\"3011\"}}}"

It seems very likely the problem is that IE in Quirks mode accept loadXML even when the input is JSON, but will reject such in strict mode.

 

I will look into using a <meta http-equiv="X-UA-Compatible" content="IE=10" /> directive or something similar to make sure Quirks mode is enabled for my OpenLayers application.

 

Per-Anders Staav
Systemutvecklare
Mobil: 0768-44 10 36
per-anders.staav-bi2R9l8QJkmEogu45VfRew@public.gmane.org

Norconsult Astando AB
Hantverkargatan 5K
112 21 Stockholm

www.astando.se

 

_______________________________________________
Users mailing list
Users@...
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Sven Schroeter | 18 Nov 17:07 2014
Picon

remove selected feature

Hi,

just switched from OL 2.12 to 2.13.

in my edit client (2.12.) I used this function to remove a single selected
feature on a vector layer:

mod_edit_layer.removeFeatures(modifyControl.feature);

now (using 2.13) I added a select Control, and the modifyControl looks like
this:

//Select Control
selectControl = new OpenLayers.Control.SelectFeature([mod_edit_layer]);
	
//Control Edit
modifyControl = new OpenLayers.Control.ModifyFeature(
		mod_edit_layer, {
		standalone: true,
		displayClass : "olControlModifyFeature",
		title : "Objekte bearbeiten"
});

If I try to remove a single Feature after selected it, it does not work:

mod_edit_layer.removeFeatures(modifyControl.feature);

The selected feature is removed, but some vectors keep left that are no
longer selectable.
I also tried it with destroyFeatures and refresh, but no way...

Any idea?

Sven
Richard Knop | 18 Nov 11:21 2014
Picon

features out of synch when panning map

Hi,

 

We’re running into an issue with our Openlayers 2.12 application in combination with Geoserver 2.3.1 and Ext.js 4.2.1 panels. In a panel we have an Openlayers map. We get a WMS service from Geoserver and some features via SQL Server Geometry, transformed to WKT, next projected on the map with javascript. Everything works fine; when loaded the features of the vector layer and map are projected correctly. However – when we drag / pan the map the features seem to be positioned out of synch with the baselayer from Geoserver. Across different browsers. We’ve tried quite a lot to redraw, synch features, use the right projection (28992) use other (default) projections, setting bounds, but the features keep shifting after a pan. When zooming in or out, the features are back in the right position again. Can someone point us in the right direction / any ideas what this can be?

 

 

Thanks in advance,

 

Richard

 

_______________________________________________
Users mailing list
Users@...
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Wolfgang Wienke | 13 Nov 20:51 2014
Picon
Picon

displaying circle on Bing-layer

Hi,
I try to show circles on a map with a bing "Aerial"-Layer.
In OpenLayers V3 the examples are working fine.
But when i change the layer in the example to the bing layer, the circle 
is no longer displayed.
In Open layers V2, the circle is only shown on a base layer. It does not 
show on a Bing Layer.
Is this a feature, or where are my mistakes?
--

-- 
                                mit freundlichen Grüssen

                                      Wolfgang Wienke
Huub Fleuren | 12 Nov 16:29 2014
Picon

getting features from GML.v3().read()

Hi List,

I was trying to read the following GML text with the Format.GML.v3

<?xml version="1.0" encoding="UTF-8"?>
<gml:MultiGeometry xmlns:gml="http://www.opengis.net/gml"
xmlns:sch="http://www.ascc.net/xml/schematron" srsDimension="2">
<gml:geometryMember>
<gml:Polygon srsDimension="2">
<gml:exterior>
<gml:LinearRing srsDimension="2">
<gml:posList>115.0 15.5 118.0 16.0 118.0 18.0 113.0 17.166666666666668 112.0 18.0 114.5 20.0 120.0 20.0 120.0 10.0 116.2 10.0 118.0 13.0 115.0 15.5
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:geometryMember>
<gml:geometryMember>
<gml:Polygon srsDimension="2"><gml:exterior><gml:LinearRing srsDimension="2">
<gml:posList>115.0 15.5 118.0 13.0 116.2 10.0 110.0 10.0 110.0 20.0 114.5 20.0 112.0 18.0 113.0 17.166666666666668 112.0 17.0 112.0 15.0 115.0 15.5
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:geometryMember>
</gml:MultiGeometry>

code:
var gml = new OpenLayers.Format.GML.v3(); var features = gml.read(GMLtext);


Apparently this is parsed correctly by Format.XML, but i never get a list of features from the read () function.

Is it possible? How?

Regards, Huub
_______________________________________________
Users mailing list
Users@...
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Wolfgang Wienke | 6 Nov 21:54 2014
Picon
Picon

Bing-Layer with OSM-API V3

Hi,
I tried the above, the aerial works with:

var    map = new ol.Map({
     target: 'map',
     layers: [ new ol.layer.Tile({ source: new ol.source.BingMaps({
                 key: <mein Key>,
                 imagerySet: 'AerialWithLabels' })
                 })
         ],
         view: new ol.View({ center: 
ol.proj.transform([6.10428,50.76079], 'EPSG:4326', 'EPSG:3857'),
                 zoom: 11 }),
     });

I tried to get (standard) controls and attribution, but nothing works. 
Any idea about my bugs?
Do I need additional scripts or *.css?

--

-- 
                                mit freundlichen Grüssen

                                      Wolfgang Wienke
joaorodr84 | 6 Nov 12:53 2014
Picon

WMS does not work / Wrong getImageSize method gets called


Hi
I am using this "minified" version of OpenLayers recently. But it does not
work with WMS layers.
OpenLayers.js
<http://osgeo-org.1560.x6.nabble.com/file/n5171621/OpenLayers.js>  

Here is what I get in the Chrome Dev Tools, on map initialization:

Uncaught TypeError: Cannot read property 'getWidth' of undefined
OpenLayers.js:9037
OpenLayers.Layer.Grid.OpenLayers.Class.getImageSize OpenLayers.js:9037
OpenLayers.Tile.Image.IFrame.createRequestForm OpenLayers.js:31236
OpenLayers.Tile.Image.IFrame.setImgSrc OpenLayers.js:31245
OpenLayers.Tile.Image.OpenLayers.Class.initImage OpenLayers.js:8733
OpenLayers.Tile.Image.OpenLayers.Class.renderTile OpenLayers.js:8674
OpenLayers.Tile.Image.OpenLayers.Class.draw OpenLayers.js:8665
OpenLayers.Tile.Image.IFrame.draw OpenLayers.js:31198
OpenLayers.TileManager.OpenLayers.Class.drawTilesFromQueue
OpenLayers.js:27135
(anonymous function) OpenLayers.js:27095
(anonymous function) OpenLayers.js:169

It seems that the error comes from the fact that there are 3 methods called
getImageSize

In line 31236, we have:
        this.layer.getImageSize();

And I this it uses the wrong getImageSize method, because it uses this one
(from line 9036):
    getImageSize: function(a) {
        var b =
OpenLayers.Layer.HTTPRequest.prototype.getImageSize.apply(this, arguments);
        this.singleTile && (b = new OpenLayers.Size(Math.round(a.getWidth()
/ this.gridResolution), b.h));
        return b
    },
As you can see, this one has an argument, and the one we called, doesn't.

I think the getImageSize method that should be called is this one (line
4660):
    getImageSize: function() {
        return this.imageSize || this.tileSize
    },

I renamed the one from line 9036 to getImageSize2, and it worked. I know
this is not a solution, but I think there might be a bug there and I come
here to ask how I could correct it.

Note: I downloaded OpenLayers from GitHub, created a minified version and
this problem was also present.

I hope you can help me.

Thanks.

João

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMS-does-not-work-Wrong-getImageSize-method-gets-called-tp5171621.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
Roel De Nijs | 5 Nov 13:58 2014
Picon

Re: Alternatives to get rid of WFS layers

Hi all,

 

Thanks all for the valuable input. Highly apreciated!

 

In our database we have a table for each object type containing all data for records of this object type (can be 200-300 attributes/fields and even more). For every possible layer we have a dedicated spatial table with just the needed attributes for geoserver to render each feature correctly. So these tables have uid, geometry (points and linestrings) and at most 3-4 additional attributes.

 

The WMS layers do all the displaying of the features (color, symbol/shape, width,…). The WFS layers are only used to let users hover and show some attribute info (not included in the wfs, but a seperate rest request) , select some features (to use in another part of the application), double click the feature to manage its information) and so on. So because a layer is based on its dedicated spatial table, the returned WFS data is limited to a uid, geometry and a few attributes.

 

Because a sewer system can be quite dense (certainly in a city), the number of visible features on a given zoom level can range from 5000 to 25000. In the current (production) version of the application all WFS data for these features is loaded and processed (but as mentioned before not for displaying purposes).

 

After our performance testing (after the complaints/criticism) we also noticed that WFS has a huge impact on performance. And that’s also confirmed by some replies in this thread. So we are definitely on the right track :) We currently try to rethink and rework the application and avoid the use of WFS completely (or as much as possible). So the current (development) version of the application has only WMS being loaded. Together with some other little changes (e.g. layers based only on tables, not on views anymore) we managed to improve the performance drastically. So far so good!

 

But most functionalities in the application depend on these WFS layer(s). But this data is now not available anymore. So our main and biggest challenge is to create the same (or similar) user experience without the WFS layers. For example, a user could double click on a feature and a page with its detailed information was opened. So we had a SelectFeature control which operated on the WFS layers and had a doubleclick callback to open this page.

Now I have implemented a GetFeature control which displays all features on hover (or click),. But I wonder how you can create a similar user experinece for e.g. double click? So what’s considered the standard or most appropriate approach to achieve this kind of functionality? Do I need to have a SelectFeature control which wraps a GetFeature control? Or do better alternatives exist?

 

Kind regards,

Roel

 

Van: Glenn Mullett [mailto:tchagra <at> gmail.com]
Verzonden: woensdag 5 november 2014 5:02
Aan: Roel De Nijs
CC: openlayers-users <at> lists.osgeo.org
Onderwerp: Re: [OpenLayers-Users] Alternatives to get rid of WFS layers

 

Hi Roel

I agree with Phil.  However, in times when you need to load many features through wfs, you can also try the following:

- Use geojson as the output format, not gml - this will greatly reduce the response size.

- Configure the webserver to gzip text content - this will also give quite a performance boost.

- You could pipe all requests to your backend wfs server through a php proxy (using curl to send and retrieve the content from the wfs server).  If you are going to then be making many of the same type of request through the proxy, you can enable a webserver side content cache such as mod_mem_cache (apache) to speed things up a little

- wfs 2.0 protocol supports paging by providing a recordcount variable.  You may be able to use this feature of wfs 2.0 together with an e.g. paged geoext featuregrid and only load x number of features at a time.

Kind regards,
Glenn

On 5 Nov 2014 00:01, "Phil Scadden" <P.Scadden <at> gns.cri.nz> wrote:

I've posted here a number of times on WMS/WFS. My advice is never use WFS when you can do WMS instead. In particular, you use WMS for all display. I use WFS when I want attribute information and I get that on demand with getfeature queries, which can be onHover. If there isnt too much geometry, then I return WFS geometry and draw it to show selections etc. but for objects with dense geometry SldSelect works better. Rethink the application as WMS and you will get far better performance.

Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.


_______________________________________________
Users mailing list
Users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users


Volg Aquafin op Facebook | Twitter | YouTube | LinkedIN

Disclaimer: zie www.aquafin.be   P Denk aan het milieu. Druk deze mail niet onnodig af.
_______________________________________________
Users mailing list
Users@...
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Roel De Nijs | 4 Nov 17:32 2014
Picon

Alternatives to get rid of WFS layers

Hi list,

 

We have a web application displaying some geographical data (about the sewerage system) and using OpenLayers 2.13.1 as front-end library (geoserver as back-end). Currently we have +- 30 object (feature) types. Every object type has a WMS and WFS layer in the map. The visibility of each object type is dependent on a minimum/maximum zoom level and/or can be turned off by the user. The user can perform a set of standard functions on the map (zoom, pan,…) and each feature (hover, select, double click,…).

Everything works fine, but the main criticism about this application is (very) poor performance, being (very) slow and making the browser freeze. Sometimes the only option is to close the browser and start again. Not the most user-friendly approach.

 

We did some testing related to the performance. One of the things we noticed, WFS data has a huge impact on performance. From a certain zoom level, the WFS data (for all layers) retrieved the server is 750KB – 1MB (and that’s the gzipped version). It takes some time to load all this data (certainly if the user is on the road) and also to process the data. If you zoom and pan a few times, you’ll probably have to close your browser (mostly IE) and start over again. Users sometimes have to wait 15-20 seconds before a pan or zoom request has finished, which is inacceptable from a user’s point of view.

 

I can’t imagine this application is the only one having to deal with so much WFS data, so I was wondering how other developers managed big amounts of WFS data and keeping their web application responsive while loding/processing the WFS data.

 

Or maybe some alternative/work-around exists to get rid of the WFS layers/data, but still keep the feature functions (like hovering, (multiple) selection, box selection, double click,…)?

 

Another path I have already experimented with is loading the WFS data on-demand, because the user is probably not interested in all features but only in some of them. Using the GetFeature control I’m able to get the features underneath the mouse cursor. But I’m wondering how I can incorporate all other feature functions. Because e.g. the Select control uses a wfs layer, but the layers doesn’t contain features anymore.

 

I’m really desperate, so I appreciate all insights, suggestions, pointers, hints, a lot! J

 

Kind regards,

Roel De Nijs

Senior Java Developer


Volg Aquafin op Facebook | Twitter | YouTube | LinkedIN

Disclaimer: zie www.aquafin.be   P Denk aan het milieu. Druk deze mail niet onnodig af.
_______________________________________________
Users mailing list
Users@...
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Gmane