Select to view content in your preferred language

Accessing ImageService in C#

682
2
Jump to solution
09-11-2012 09:46 PM
Labels (1)
HumzaAkhtar
Deactivated User
Hi,

Can anyone provide a short sample C# code or guide in accessing the imageservices hosted by esri Arcgis REST through C#? In the samples provided, the access to image service is from xaml and not from  C#. I will be highly grateful.


Thanks
Humza
0 Kudos
1 Solution

Accepted Solutions
HumzaAkhtar
Deactivated User
Sample with C# from ArcGIS Runtime SDK for WPF / Datasources / Simple

   <Grid>         <esri:Map x:Name="_map" Extent="-13486609,5713307,-13263258,5823117">             <esri:ArcGISTiledMapServiceLayer Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer" />         </esri:Map>     </Grid>


public MainWindow()         {             InitializeComponent();               var imageryLayer = new ArcGISImageServiceLayer                 {                     Url = @"http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Portland/CascadeLandsat/ImageServer",                     ID = "ImageryLayer",                     ImageFormat = ArcGISImageServiceLayer.ImageServiceImageFormat.PNG8,                     NoData = 0                 };               _map.Layers.Add(imageryLayer);         }


Thanks a lot for your help 🙂

Regards

View solution in original post

0 Kudos
2 Replies
AnttiKajanus1
Deactivated User
Sample with C# from ArcGIS Runtime SDK for WPF / Datasources / Simple

   <Grid>
        <esri:Map x:Name="_map" Extent="-13486609,5713307,-13263258,5823117">
            <esri:ArcGISTiledMapServiceLayer Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer" />
        </esri:Map>
    </Grid>


public MainWindow()
        {
            InitializeComponent();


            var imageryLayer = new ArcGISImageServiceLayer
                {
                    Url = @"http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Portland/CascadeLandsat/ImageServer",
                    ID = "ImageryLayer",
                    ImageFormat = ArcGISImageServiceLayer.ImageServiceImageFormat.PNG8,
                    NoData = 0
                };


            _map.Layers.Add(imageryLayer);
        }
0 Kudos
HumzaAkhtar
Deactivated User
Sample with C# from ArcGIS Runtime SDK for WPF / Datasources / Simple

   <Grid>         <esri:Map x:Name="_map" Extent="-13486609,5713307,-13263258,5823117">             <esri:ArcGISTiledMapServiceLayer Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer" />         </esri:Map>     </Grid>


public MainWindow()         {             InitializeComponent();               var imageryLayer = new ArcGISImageServiceLayer                 {                     Url = @"http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Portland/CascadeLandsat/ImageServer",                     ID = "ImageryLayer",                     ImageFormat = ArcGISImageServiceLayer.ImageServiceImageFormat.PNG8,                     NoData = 0                 };               _map.Layers.Add(imageryLayer);         }


Thanks a lot for your help 🙂

Regards
0 Kudos