|     Documentation    |     Premium Support

ArcGISServerRestLayer Sample Code


Is there a sample project available that uses the ArcGISServerRestLayer (or something similar) to load in data from ESRI/ArcGIS Portal? I have seen some links referenced in older forum posts, but those links are no longer valid.


Hey @Dane_Johnson,

The ArcGIS layer uses their export command to obtain images from the server. Our API is a bit limited, but you can attach parameters to the request string to limit the layers. For example, here is how to get a simple map of Frisco, TX city limits:

ArcGISServerRestLayer layer = new ArcGISServerRestLayer(new Uri(""));
layer.Parameters["layers"] = "show:5";
layer.Parameters["format"] = "PNG32";
layer.Parameters["transparent"] = "true";

There are other query paramters that you can use as well. Just know that we handle the BBOX and SIZE and F parameters automatically. You should be able to see other parameters that you can send from ESRI’s API documentation. And if you are ever unsure about why things aren’t working for you, using QGIS and viewing their network requests might help.