LatLonBoundingBox pink tile issue

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

LatLonBoundingBox pink tile issue

Luke Michels

I have an web application that makes calls to wms services by means of the GetCapabilities request. From there the GetCapabilities response is parsed and changed into an xml document from which
mapbuilder can make a map. A problem that I am running into is that when the GetCapabilities request gives me layers with a LatLonBoundingBox that isn't global and I am zoomed into an area that is bigger but still contains the LatLonBoundingBox, I get a pink tile for the layer. When my viewport is at that bounding box or within it the image shows fine. I was wondering why this was happening and if there was a way to change it so it just overlays the image on the map where the data exists rather than a pink tile covering the entire viewport? Any ideas/suggestions?
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
mapbuilder-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: LatLonBoundingBox pink tile issue

Olivier Terral
Hi Luke,

The problem comes from OpenLayers, an OpenSource project used by mapbuilder to render the map.


When the wms request failed, OpenLayers change the css property of  the layer div  to pink.
You can modify directly in the file /lib/util/openlayers/OpenLayers.js, and  change the property OpenLayers.Util.onImageLoadErrorColor  to transparent.

The second solution is to redefine all the function called when request failed  to do what you want:

OpenLayers.Util.onImageLoadError=function(){
    this._attempts=(this._attempts)?(this._attempts+1):1;
    if(this._attempts<=OpenLayers.IMAGE_RELOAD_ATTEMPTS){
        this.src=this.src;
    }else{
        this.style.backgroundColor=OpenLayers.Util.onImageLoadErrorColor;
    }
    this.style.display="";
}



Regards





Luke Michels wrote
I have an web application that makes calls to wms services by means of the
GetCapabilities request. From there the GetCapabilities response is parsed
and changed into an xml document from which
mapbuilder can make a map. A problem that I am running into is that when
the GetCapabilities request gives me layers with a LatLonBoundingBox that
isn't global and I am zoomed into an area that is bigger but still
contains the LatLonBoundingBox, I get a pink tile for the layer. When my
viewport is at that bounding box or within it the image shows fine. I was
wondering why this was happening and if there was a way to change it so it
just overlays the image on the map where the data exists rather than a
pink tile covering the entire viewport? Any ideas/suggestions?
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
mapbuilder-devel mailing list
mapbuilder-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: LatLonBoundingBox pink tile issue

Ozaki
With the latest version of Open Layers (March 2010)
"/lib/util/openlayers/OpenLayers.js" is changed to "/lib/OpenLayers/util.js"

--Ozaki
Loading...