Bistrais, Bob | 23 Oct 19:46 2014

Display overlays under base layers?

I have a number of imagery layers (selected with radio buttons) that I would like to have display on top of certain background layers (selected with checkboxes).  I’ve tried changing the order of layers, the isBaseLayer option, and so forth, but I cannot get it to work that way.  Is it possible to this? 

 

Thanks,
Bob

_______________________________________________
Users mailing list
Users@...
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Stephen Brooke | 22 Oct 07:00 2014

Receive "Uncaught TypeError" from OpenLayers.Event.observe method when zoom in while processing WMS request from previous zoom operation

Hi list,

I am using OpenLayers 2.13.1.

 

I am experiencing a problem when zoom in/out while OpenLayers is in process of loading images from several WMS requests that resulted from a previous zoom operation.

 

Uncaught TypeError: Cannot read property '_eventCacheID' of null                         OpenLayers.debug.js:5178                                         

OpenLayers.Event.observe                                                                                                        OpenLayers.debug.js:5178                                         

tile.onLoadEnd                                                                                                                                 OpenLayers.debug.js:31046                       

OpenLayers.Events.OpenLayers.Class.triggerEvent                                                                        OpenLayers.debug.js:5812                                         

OpenLayers.Tile.OpenLayers.Class.unload                                                                          OpenLayers.debug.js:29266                       

OpenLayers.Tile.Image.OpenLayers.Class.draw                                                                OpenLayers.debug.js:29584                       

OpenLayers.Layer.Grid.OpenLayers.Class.initGriddedTiles                                          OpenLayers.debug.js:30957                       

OpenLayers.Layer.Grid.OpenLayers.Class.moveTo                                                         OpenLayers.debug.js:30428                       

OpenLayers.Map.OpenLayers.Class.moveTo                                                                     OpenLayers.debug.js:9299                                         

map.zoomTween.start.callbacks.done                                                                                  OpenLayers.debug.js:9682                                         

OpenLayers.Tween.OpenLayers.Class.stop                                                                        OpenLayers.debug.js:6697                                         

OpenLayers.Tween.OpenLayers.Class.play                                                                         OpenLayers.debug.js:6730                                         

(anonymous function)                                                                                                                  OpenLayers.debug.js:615                                           

loops.(anonymous function)                                                                                                     OpenLayers.debug.js:6528

 

 

I am having an extremely difficult time trying to determine what my app is doing to make OpenLayers react this way.  The effect of the error is that zoom in/out capability breaks on the map until I reload the page.

Can someone enlighten me as to what may be going on here?

 

 

More background on the problem:

============================

One way I have been able to avoid the problem, although it is not an acceptable solution, is to add the following code near the top of the “OpenLayers.Event.observe” method:

 

        if (element == null){

                //console.log("element: " + element + ", name: " + name + ", observer: " + observer + ", " + "useCapture: " + useCapture);

                return;

        }

 

Like this:

 

    /**

     * Method: observe

     *

     * Parameters:

     * elementParam - {DOMElement || String}

     * name - {String}

     * observer - {function}

     * useCapture - {Boolean}

     */

    observe: function(elementParam, name, observer, useCapture) {

        var element = OpenLayers.Util.getElement(elementParam);

        useCapture = useCapture || false;

 

       //Begin added lines

        if (element == null){

                //console.log("element: " + element + ", name: " + name + ", observer: " + observer + ", " + "useCapture: " + useCapture);

                return;

        }

       //End added lines

 

        if (name == 'keypress' &&

           (navigator.appVersion.match(/Konqueror|Safari|KHTML/)

           || element.attachEvent)) {

            name = 'keydown';

        }

 

        //if observers cache has not yet been created, create it

        if (!this.observers) {

            this.observers = {};

        }

 

        //if not already assigned, make a new unique cache ID

        if (!element._eventCacheID) {                         ç============= This is the line the error occurs because “element” is null

            var idPrefix = "eventCacheID_";

            if (element.id) {

                idPrefix = element.id + "_" + idPrefix;

            }

            element._eventCacheID = OpenLayers.Util.createUniqueID(idPrefix);

        }

 

 

_______________________________________________
Users mailing list
Users@...
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Thomas Wagner | 21 Oct 14:01 2014

Re: Control a OpenLayer 3 Map per Keys

Here is my jsfiddle link:
Pol <d.paolino-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> hat am 21. Oktober 2014 um 13:45 geschrieben:

You should use jsfiddle to create an online example.

On Oct 21, 2014 1:38 PM, "Tomcom" < tom-/8uS0c2l+lmEi8DpZVb4nw@public.gmane.org> wrote:
Hello,
I am going to switch from OL2 to OL3.
Using my Map on a SmartPhone is pretty cool but on a classic computer I am
not able to contol the map by using keys (up,down,left,right,+,-).
Several Google links dealing with
http://openlayers.org/en/v3.0.0/apidoc/ol.interaction.html like
https://github.com/openlayers/ol3/pull/1001 won't have any effect on my map.
I can't enable keyboard actions and also can't disable the map rotation on
smartphones.

So here is my HTML-Code:
Any idea what is wrong.




Cheers,
Tom



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Control-a-OpenLayer-3-Map-per-Keys-tp5168641.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
Users-qjLDD68F18NyQMAyxoHuMA@public.gmane.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users

 
_______________________________________________
Users mailing list
Users@...
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Tomcom | 21 Oct 13:38 2014

Control a OpenLayer 3 Map per Keys

Hello, 
I am going to switch from OL2 to OL3.
Using my Map on a SmartPhone is pretty cool but on a classic computer I am
not able to contol the map by using keys (up,down,left,right,+,-).
Several Google links dealing with
http://openlayers.org/en/v3.0.0/apidoc/ol.interaction.html like
https://github.com/openlayers/ol3/pull/1001 won't have any effect on my map.
I can't enable keyboard actions and also can't disable the map rotation on
smartphones.

So here is my HTML-Code:
Any idea what is wrong.

Cheers,
Tom

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Control-a-OpenLayer-3-Map-per-Keys-tp5168641.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
simulsys | 14 Oct 16:07 2014
Picon

Neither Markers nor Features show markers with version 2.13

Hi,

I have tried a large number of advised standard methods over two days of
adding markers to a new vector layer, using addMarker and addFeatures, but I
have not seen a marker at all, using Opera, IE and Chrome.

I am using Openlayers 2.13 (I think?) in Microsoft Visual Studio Express for
Web 2013 on an Acer i5 with Windows 8.1, and my base layer is a Bing map.

The layer shows up on the LayerHandler, ticked, but no markers.

As I said, I have tried known methods to no avail, and I am concerned that
as this is not browser-specific, it might be compatibility at some level?

Can anyone recommend a method of adding a marker which works, please? Or at
least a direction to look?

All the best,

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Neither-Markers-nor-Features-show-markers-with-version-2-13-tp5167469.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
VictoriaH | 12 Oct 20:14 2014
Picon

Sugggestions for implementing raster time series

Hello,

I am currently trying to build a web application in OpenLayers that will
allow a user to either 1. select a date from a dropdown and have the map
display a raster image with an indexed date; or 2. use a slider to drag to
show the rasters associated with the indexed dates. 

On the backend, I have tried for weeks to get a Geoserver imagemosaick
plugin to load my series of geotiff images...nothing but endless
problems...about ready to give up on geoserver. I can use mapserver as an
alternative, as I have experience setting up a time-enabled raster layer...

On the front end, I want to use a javascript module that is easy to
understand...I have seen documentation for jquery slider, jquery ui and
layout....I would like to know what combination of tools users might have
experience with for serving time series raster data, and a front end that
can easily allow selecting dates and even building animations.. I would
appreciate being able to look at code examples for doing this with one of
the javascript modules...

Thanks, Vick

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Sugggestions-for-implementing-raster-time-series-tp5167079.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Jelmer Baas | 10 Oct 14:47 2014
Picon

OL3 and Cesium

Hi All,

I was just toying around with WebGL Earth, and thought it would be fun to see what the current state of OL3 and
Cesium is. 

Unfortunately, I haven't been able to find a working example, yet. I found:
http://dev.camptocamp.com/files/elemoine/ol3/examples/cesium.html (broken)
https://groups.google.com/forum/#!topic/ol3-dev/riAsUwiFOrw (old)
http://tschaub.net/say-hello-to-ol3/#/4 (yay!)
	http://tschaub.net/say-hello-to-ol3/examples/tiles-galore.html (broken)
	http://tschaub.net/say-hello-to-ol3/#/26 (static)
http://gis.stackexchange.com/questions/69629/how-to-create-3d-globe-view-with-openlayers (incomplete)

Can someone please point me in the right direction?

Regards,
Jelmer Baas
Ismail, Mark | 10 Oct 12:12 2014
Picon

WMSGetFeatureInfo request to geoserver too sensitive

I am using openlayers 2 and issuing a WMSGetFeatureInfo request to geoserver

 

It works fine but It is far to sensitive to where you click – if you don’t get right in the centre of a point or icon it finds nothing, it can take 2 or 3 attempts to get a response even if clicking carefully and zoomed in

 

Is there any way to make that click “less sensitive” so it will pick up the closest point  to the mouse click ?

 

Mark Ismail

 

This e-mail and any attachments are confidential. It may contain privileged information and is intended for the named recipient(s) only. It must not be distributed without consent. If you are not one of the intended recipients, please notify the sender immediately and do not disclose, distribute, or retain this email or any part of it and do not take any action based on it.

Unless expressly stated, opinions in this email are those of the individual sender, and not of Knowsley MBC. Legally binding obligations can only be created for, or be entered into on behalf of, Knowsley MBC by duly authorised officers or representatives.

Knowsley MBC excludes any liability whatsoever for any offence caused, any direct or consequential loss arising from the use, or reliance on, this e-mail or its contents. We believe but do not warrant that this e-mail and any attachments are virus free. You must therefore take full responsibility for virus checking and no responsibility is accepted for loss or damage arising from viruses or changes made to this message after it was sent. Knowsley MBC reserves the right to monitor and/or record all e-mail communications through its network in accordance with relevant legislation.
_______________________________________________
Users mailing list
Users@...
http://lists.osgeo.org/mailman/listinfo/openlayers-users
maven apache | 10 Oct 04:20 2014
Picon

Viewport pixel and lonlat transformation problem

Hi:

I am using Ol 2.13.1,and  I found that  the transformation from viewport pixel to lonlat may result in unexpected result, for example, the following two lines should give the same result, but sometimes not.

console.info(map.getCenter());
console.info(map.getLonLatFromViewPortPx(new OpenLayers.Pixel(map.size.w/2,map.size.h/2)));
And it seems that once you drag and drop the map quickly to make the "kinetic" work, then you will get different result, once you drag the map slowly(which does not cause the "kinetic", you will get the same result.

Live example:http://jsfiddle.net/99x928aL/
I know this can be fixed by disabling the "kinetic" feature, but I wonder if it is possible with the feature enabled?
_______________________________________________
Users mailing list
Users@...
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Luís de Sousa | 8 Oct 15:48 2014
Picon

WFS layer not being portrayed in map canvas

Dear all,

I have a "rich" application (OL 2.13 + GeoExt 1) where some layers
must be styled dynamically according to user input. I am able to add a
vector layer using WFS and then apply a style rule. Recently some
users started complaining the feature is not working. Eventually I
found out some WFS layers are not being portrayed in the map canvas by
OL.

Below is a minimum example with a simple map and one of the
problematic layers. After loading all objects the debugger shows a
vector layer within the map object; this vector layer is reporter as
visible and with the drawn property set to true. In the features array
there are 8 objects as expected, but there is nothing visible in the
map. There are no errors reported in the console.

I am able to display this same layer through WFS in QGIS and access
all its attributes without trouble.

What is going wrong here? Thank you,

Luís

<html>
<head>

 <script type="text/javascript"
src="http://localhost/spatiallib/OpenLayers-2.13.1/OpenLayers.js"></script>
 <link rel="stylesheet" type="text/css"
href="http://localhost/spatiallib/OpenLayers-2.13.1/theme/default/style.css">

 <script type="text/javascript">

function initMap()
{
    // Do not forget to add maps.iguess.tudor.lu to the proxy's
allowed addresses
    OpenLayers.ProxyHost = "http://localhost/cgi-bin/proxy.cgi?url=";

    var mapProjection = "EPSG:31467";
    var mapServicePath =
"http://maps.iguess.tudor.lu/cgi-bin/mapserv?map=/srv/mapserv/MapFiles/LB_localOWS_test.map";

    var bounds = new OpenLayers.Bounds(3500000,5410000,3525000,5425000);

    map = new OpenLayers.Map("MiniMap",{
        projection: new OpenLayers.Projection(mapProjection),
        units: "m",
        maxExtent: bounds,
    });

    map.addControl(new OpenLayers.Control.LayerSwitcher());

    var cityWMS =  new OpenLayers.Layer.WMS(
        "LB_urban_landuse",
        mapServicePath,
        {layers: "LB_urban_landuse",
         format: "image/png",
         srsName: mapProjection,
          transparent: "true",
          projection: new OpenLayers.Projection(mapProjection)},
        {isBaseLayer: true,
          visibility: true}
    );

    var testWFS = new OpenLayers.Layer.Vector("testWFS", {
        strategies: [new OpenLayers.Strategy.Fixed()],
        projection: new OpenLayers.Projection("EPSG:31467"),
         visibility: true,
        protocol: new OpenLayers.Protocol.WFS({
            version: "1.1.0",
            url:
"http://maps.iguess.tudor.lu/cgi-bin/mapserv?map=/srv/mapserv/MapFiles/LB_localOWS_test.map",
            featureNS: "http://mapserver.gis.umn.edu/mapserver",
            featureType: "LB_sliders_test",
            srsName: "EPSG:31467"
        })}
    );

    map.addLayers([cityWMS, testWFS]);
       map.setCenter(new OpenLayers.LonLat(3514100,5417800), 7);

       testWFS.display(true);
}

 </script>
</head>
 <body onLoad="initMap();" style="margin:0px">
     <div  style="width:800px; height:600px; background:white"
id="MiniMap"></div>
     <input type=button value="Click for debugger" onclick="debugger;"></input>
 </body>
</html>
_______________________________________________
Users mailing list
Users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Bistrais, Bob | 1 Oct 21:56 2014

assertion failed

I’m having a problem trying to build an application with OL3.  I’m trying to use my own WMS layers.  I can get this to display, pan and zoom, but when I try a GetFeatureInfo, my FireBug gives the following error:

AssertionError: Assertion failed

 

Here is the URL request:

http://localhost:8080/geoserver/ows?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&FORMAT=image%2Fpng&TRANSPARENT=true&QUERY_LAYERS=mainebase%3Acounties250&LAYERS=mainebase%3Acounties250&TILED=true&INFO_FORMAT=application%2Fvnd.ogc.gml%2F3.1.1&I=91&J=214&WIDTH=256&HEIGHT=256&CRS=EPSG%3A3857&STYLES=&BBOX=-7827151.696402049%2C5635549.221409474%2C-7514065.628545967%2C5948635.289265555

 

I don’t think there’s much to go on here, but was wondering if anyone has any suggestions on what I might look for?

Thanks,

Bob

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

Gmane