[OpenLayers-Users] Problem by update ol212 - tiles not show andlost by move

Arnd Wippermann arnd.wippermann at web.de
Mon Apr 15 09:10:53 PDT 2013


Hi Jan,

most likely you have to set in the tileOptions the key crossOriginKeyword to
null
 
    /** APIProperty: tileOptions
     *  {Object} optional configuration options for <OpenLayers.Tile>
instances
     *  created by this Layer. Default is
     *
     *  (code)
     *  {crossOriginKeyword: 'anonymous'}
     *  (end)
     *
     *  When using OSM tilesets other than the default ones, it may be
     *  necessary to set this to
     *
     *  (code)
     *  {crossOriginKeyword: null}
     *  (end)
     *
     *  if the server does not send Access-Control-Allow-Origin headers.
     */
    tileOptions: null,

https://github.com/openlayers/openlayers/blob/master/notes/2.12.md#osm-and-b
ing-layers

Arnd


-----Ursprüngliche Nachricht-----
Von: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Jan
Tappenbeck
Gesendet: Montag, 15. April 2013 14:36
An: openlayers-users at lists.osgeo.org
Betreff: [OpenLayers-Users] Problem by update ol212 - tiles not show andlost
by move

Hallo !

i try to update a website from ol210->ol211 for using table-devices.

i should have make all request mimigration-edits but i have a little
problem:

* the tiles of map will come by the wikipedia.tile-server - will not show,
but no error-message in the firebug. when i copy the url to the wik-tiles a
image will show !

did i have forget something in the function

   OpenLayers.Layer.OSM.Toolserver =
OpenLayers.Class(OpenLayers.Layer.OSM, {

     initialize: function(name, options) {
         var url = [
             "http://a.www.toolserver.org/tiles/" + name +
"/${z}/${x}/${y}.png",
             "http://b.www.toolserver.org/tiles/" + name +
"/${z}/${x}/${y}.png",
             "http://c.www.toolserver.org/tiles/" + name +
"/${z}/${x}/${y}.png"
         ];

         options = OpenLayers.Util.extend({numZoomLevels: 19}, options);
         OpenLayers.Layer.OSM.prototype.initialize.apply(this, [name, url,
options]);
     },

     CLASS_NAME: "OpenLayers.Layer.OSM.Toolserver"
    });

at the mimigration to ol212 ??

* the tiles of myself (port-names on the layer "label_en") will lost, when
move the map by middle-mouse-button. when i zoom in/out buy button is ok !

the side is: http://osm.tappenbeck.net/ferry2013/deu/ferry_iframe.php
(there commes a error-message window.parent.set_active_port is not a
function - when click to a red-marker -> ignore it!!

secound-questions: when a png-file is missing there comes a message too
- but in the screen.css-file i added:

.olImageLoadError {
   display: none;
}


did anyone could help me ?

regards Jan :-)

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



More information about the Users mailing list