OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

#1 2012-03-16 12:11:44

Openlayers not functioning

What happened to the openlayers scripts? I use openlayers a lot to show gpx tracks. They now dont  show the map and the track. Clicking the + shows only Mapnik.

See http://wiki.openstreetmap.org/wiki/Open … ck_example
and try one of the examples there: http://oms.wff.ch/ol_track.htm

Also on a webpage of mine the map and the three borders of NL, BE and D are not visible.
http://web.inter.nl.net/users/jgalema/o … pyMap.html

Offline

#2 2012-03-16 13:00:54

Vclaw
Senior Member
From: Alba
Registered: 2009-02-25
Posts: 506
Website

Re: Openlayers not functioning

I think this is because Tiles@Home / Osmarender has now been shut down.

Try removing these lines from the webpage:

layerTilesAtHome = new OpenLayers.Layer.OSM.Osmarender("Osmarender");
map.addLayer(layerTilesAtHome);

I think that will fix it.

Offline

#3 2012-03-16 15:44:58

Re: Openlayers not functioning

That did it.

Thanks.

Osmarender has disappeared from http://www.openstreetmap.org indeed.

I owe you a beer!

Offline

#4 2012-07-12 10:58:24

Re: Openlayers not functioning

This worked for months ok.

But now again no map and track shown.

Whats the evel?

Offline

#5 2012-07-12 14:21:44

Lambertus
Administrator
From: Apeldoorn (NL)
Registered: 2007-03-17
Posts: 3,178
Website

Re: Openlayers not functioning

OpenLayers released a new version in which they removed a lot of deprecated functions (for which they have warned for many months that it would happen).

There are a few possible solutions:
- Update your javascript to use the alternative (non-deprecated) OpenLayers functions.
- Include the deprecated.js script available from OpenLayers.org in your site so that you can use the deprecated functions.
- Get an older version of OpenLayers and put it on the webserver of your website and include this version instead of including the OpenLayers.js from openlayers.org.


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#6 2012-07-12 15:47:16

Re: Openlayers not functioning

Added the deprecated.js but it did not help.
I`m in Russia and have to to this all on my phone.
Investigating is not easy.
Will see if i can find a real computer somewhere.
Anyhow: thanks.

Offline

#7 2012-07-12 16:21:59

Lambertus
Administrator
From: Apeldoorn (NL)
Registered: 2007-03-17
Posts: 3,178
Website

Re: Openlayers not functioning

I don't see the deprecated.js file being loaded, this may be a caching problem on my side (although I cleared my browser cache), but it could also be that your change hasn't reached the server yet.

My firebug says:

OpenLayers.Layer.GML is not a constructor
[Break On This Error]    

projection: new OpenLayers.Projection("EPSG:4326")});

benelux.html (line 63)

OpenLayers documentation says:

A number of properties, methods, and constructors have been marked as deprecated for multiple releases in the 2.x series. For the 2.12 release this deprecated functionality has been moved to a separate deprecated.js file. If you use any of the constructors or methods below, you will have to explicitly include the deprecated.js file in your build (or add it in a separate <script> tag after OpenLayers.js).

    OpenLayers.Class.isPrototype
    OpenLayers.Class.create
    OpenLayers.Class.inherit
    OpenLayers.Util.clearArray
    OpenLayers.Util.setOpacity
    OpenLayers.Util.safeStopPropagation
    OpenLayers.Util.getArgs
    OpenLayers.nullHandler
    OpenLayers.loadURL
    OpenLayers.parseXMLString
    OpenLayers.Ajax.* (all methods)
    OpenLayers.Element.hide
    OpenLayers.Element.show
    OpenLayers.Element.getDimensions
    OpenLayers.Tile.prototype.getBoundsFromBaseLayer
    OpenLayers.Control.MouseDefaults
    OpenLayers.Control.MouseToolbar
    OpenLayers.Layer.Grid.prototype.getGridBounds
    OpenLayers.Format.XML.prototype.concatChildValues
    OpenLayers.Layer.WMS.Post
    OpenLayers.Layer.WMS.Untiled
    OpenLayers.Layer.MapServer.Untiled
    OpenLayers.Tile.WFS
    OpenLayers.Feature.WFS
    OpenLayers.Layer.WFS
    OpenLayers.Layer.VirtualEarth
    OpenLayers.Protocol.SQL
    OpenLayers.Protocol.SQL.Gears
    OpenLayers.Layer.Yahoo
    OpenLayers.Layer.GML
    OpenLayers.Geometry.Rectangle
    OpenLayers.Renderer.NG
    OpenLayers.Renderer.SVG2

Have fun in the Orient!


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#8 2012-07-12 16:55:08

Re: Openlayers not functioning

I cannot add it to my gpxtoslippymap site as i found no android app that could handle that inter.nl server. On my greencaps site the url is to long to type. I will do later.

Offline

#9 2012-07-13 04:36:15

Re: Openlayers not functioning

http://www.greencaps.nl/reizen/2012.beg … 120621.gpx

Here i added the deprecated.js with no succes.

Offline

#10 2012-07-13 13:40:09

Vclaw
Senior Member
From: Alba
Registered: 2009-02-25
Posts: 506
Website

Re: Openlayers not functioning

That is giving a 404 not found error for http://www.openlayers.org/api/deprecated.js
If you change it to this URL, it should work: http://dev.openlayers.org/releases/Open … recated.js

Or you could download OpenLayers-2.12.zip, then find deprecated.js in the lib directory, then you can host it on your own website.

Offline

#11 2012-07-14 01:15:33

Re: Openlayers not functioning

Thanks Vclaw that finally did it. Now the 'thuisfront' can follow me again. I owe you two beer now.  And  Lambertus heeft ook nog wat tegoed.

Offline

Board footer

Powered by FluxBB
Hosting sponsored by Oxilion
Report abuse to osm at na1400 dot info