Select to view content in your preferred language

Crop/Clip Tiled Layer data to Map extend

3163
4
01-01-2011 12:19 AM
roufbaba
New Contributor III
How can i clip/crop the tiled map data to the extend of the Map? I am creating the Merged Tiled Layer Image based upon the level row and column passed in from the SL client onto the server. Now I want to send the cropped or clipped image back to the SL client. I am doing this because this tiled map is from a cross domain origin.

Prompt help will be very much appreciated.
0 Kudos
4 Replies
DominiqueBroux
Esri Frequent Contributor
You could use a proxy server and set the ProxyUrl property to this server.
0 Kudos
roufbaba
New Contributor III
Hi,
Thank very much for sending the prompt reply.

I think I wasn't able to clear my point properly. I am able to send the image back to client quite succesfully. But the issue is I need to send the cropped image which should match exactly the current extend of the Map. I need to determine the offset just like in javascript using esri.TileUtils.getCandidateTileInfo

var delta = this.map._visibleDelta ? this.map._visibleDelta : this.map.__visibleDelta;
"OffsetX": candidateTileInfo.tile.offsets.x - delta.x + (this.width / 2)
"OffsetY": candidateTileInfo.tile.offsets.y - delta.y + (this.height / 2)

Thanks and Best Regards
Rouf
0 Kudos
roufbaba
New Contributor III
Hi Dominique,

Do you have any idea about the issue?

Regards
Rouf
0 Kudos
DominiqueBroux
Esri Frequent Contributor
With Silverlight there is no exact equivalency to the JavaScript TileUtils class, but you can use the TileInfo property of the ArcGISTiledMapServiceLayer : http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.TiledLayer...

By using the array of Lods, the Width, the Height and the Origin, you should be able to do what you want but probably not that easy than with TileUtils class.
0 Kudos