# Worldwind imagery provider access problem

**URL:** <https://community.cesium.com/t/worldwind-imagery-provider-access-problem/1227>\
**Category:** CesiumJS\
**Created:** [May 21, 2014, 4:02pm UTC](https://community.cesium.com/t/worldwind-imagery-provider-access-problem/1227 "2014-05-21T16:02:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aaron\_Feng](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@Aaron\_Feng](https://community.cesium.com/u/Aaron_Feng)\
**Post date:** [May 21, 2014, 4:02pm UTC](https://community.cesium.com/t/worldwind-imagery-provider-access-problem/1227/1 "2014-05-21T16:02:58Z")

</div>

Hello everyone，

I have some problem about the imagery provider. My world wind imagery provider image request URL looks like this:  
&nbsp;&nbsp;&nbsp;&nbsp;[http://serverURL?bbox=sw\_long,sw\_lat,ne\_long,ne\_lat&width=2048&height=2048&format=image/png](http://serverURL?bbox=sw_long,sw_lat,ne_long,ne_lat&width=2048&height=2048&format=image/png)

How can I write an API for my imagery provider?

I do some work by changing TileMapServiceImageryProvider.js  
&nbsp;&nbsp;&nbsp;1, I noted the xml part.  
&nbsp;&nbsp;&nbsp;2, I change the buildImageUrl function:

&nbsp;&nbsp;&nbsp;&nbsp;function buildImageUrl(imageryProvider, x, y, level) {  
&nbsp;&nbsp;&nbsp;&nbsp;var baseLayerSize = 36;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var tileSizeDegrees = baseLayerSize / Math.pow(2, level),  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;w = tileSizeDegrees\*x-180,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s = tileSizeDegrees\*(x+1)-180,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e = tileSizeDegrees\*y-90,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;n = tileSizeDegrees\*(y+1)-90,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width = 512,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height = 512;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var url = imageryProvider.\_url + "?bbox=" + w +","+ s +","+ e +","+ n +"&width="+ width +"&height="+ height +"&format=image/png";

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var proxy = imageryProvider.\_proxy;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (defined(proxy)) {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url = proxy.getURL(url);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return url;  
&nbsp;&nbsp;&nbsp;&nbsp;}  
But it lead to a error that the Cesium cannot work without any error report.

I am looking forward your help.  
Thank you all!

Aaron
