dinsdag 24 april 2012

OpenScales with ArcGIS rest API

Today I've spent some time to get OpenScales 2.0 working with the ArcGIS rest API.
I've managed to get it working with the export api and with the tiled api

The source for the export api layer can be found here
The source for the tiled layer can be found here

The code is based on OpenScales 2.0 can be easily be ported to 2.1
Note that it's just 'test' code and can always be improved :)

AS3 example code to add a layer:

var layer1:Layer = new ArcGISRestTile("MyLayer",
"http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/");
                
var layer2:Layer = new ArcGISRestExport("MyLayer2", "EPSG:900913", http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/export?, "0");



Have fun!



Sjoerd