How can I access the map I created at my ArcGIS Server ?

541
2
Jump to solution
05-17-2012 01:58 PM
MohammedSayed
New Contributor
hello,
I have created a map using ArcGIS Desktop, then I published the map on ArcGIS Server on my localhost.
the question is how can I read my map in Xcode ?
for example how can I load this map in Xcode : http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapSe... ?

thanks
0 Kudos
1 Solution

Accepted Solutions
RickJones
Occasional Contributor II
Your map services should show in Internet Explorer in the path http://SERVER/ArcGIS/rest/services

In your app, use a path like @"http://SERVER/ArcGIS/rest/services/Addresses/MapServer"

Sorry, the code to load that is here:


    AGSDynamicMapServiceLayer* layer = [AGSDynamicMapServiceLayer dynamicMapServiceLayerWithURL:[NSURL URLWithString:kLabelsAddressURL]];
    layer.visibleLayers = [NSArray arrayWithObjects:[NSNumber numberWithInt:0], nil];
[self.mapView addMapLayer:layer withName:@"Address Labels"];

View solution in original post

0 Kudos
2 Replies
RickJones
Occasional Contributor II
Your map services should show in Internet Explorer in the path http://SERVER/ArcGIS/rest/services

In your app, use a path like @"http://SERVER/ArcGIS/rest/services/Addresses/MapServer"

Sorry, the code to load that is here:


    AGSDynamicMapServiceLayer* layer = [AGSDynamicMapServiceLayer dynamicMapServiceLayerWithURL:[NSURL URLWithString:kLabelsAddressURL]];
    layer.visibleLayers = [NSArray arrayWithObjects:[NSNumber numberWithInt:0], nil];
[self.mapView addMapLayer:layer withName:@"Address Labels"];
0 Kudos
MohammedSayed
New Contributor
thank you very much 😃
it worked 😉

I used this code :
[PHP]
NSURL *mapUrl = [NSURL URLWithString:@"http://localhost/arcgis/rest/services/whatever/MapServer"];
AGSDynamicMapServiceLayer* layer = [AGSDynamicMapServiceLayer dynamicMapServiceLayerWithURL:mapUrl];
[self.mapView addMapLayer:layer withName:@"anyName"];
[/PHP]
0 Kudos