[OSM-dev] Show Image of Data not Available where Tiles are Empty

PARVEEN ARORA parveenaroraosm at gmail.com
Fri Jul 9 13:29:22 BST 2010


Thank You for your Help,


> Dear List,
>>
> Hi!
>
>
> >You can take a look at [1] where this script is used.

        I have tried by changing the position of script, but there is no
effect

>
>
>  Is there any other way to show the default image in empty tiles ?
>> Please Help..
>>
>
> >It seems this is done by the code snippet around
> OpenLayers.Util.onImageLoadError. There is a if-switch that uses this.src.
> to limit the error->image to tiles loaded from *.openstreetmap.org. You
> could override this behaviour by putting a <script />-Tag after the <script
> />-Tag that loads >OpenStreetMap.js like this:
>
> <script type="text/javascript">
> OpenLayers.Util.onImageLoadError = function() {
>  this.src = "/url/to/your/error.png
> };
> </script>
>   I have edited the file by the code given below:
>
     <script type="text/javascript">
     OpenLayers.Util.onImageLoadError=function(){

     http://www.openstreetmap.org/openlayers/OpenStreetMap.js"=
http://www.openstreetmap.org/openlayers/img/404.png
     };
     </script>
      but this is also not working.
      Please check is there any mistake in my code


>
> Peter
>
> [1] <http://toolserver.org/~osm/styles/>
>



-- 
With Kind Regards
Parveen Arora
osmpunjab.co.cc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20100709/82e50c9e/attachment.html>


More information about the dev mailing list