Select to view content in your preferred language

Loading multiple map layers with different image formats

1263
9
12-26-2011 10:44 PM
KhurramSaleem
Emerging Contributor
Hello, I am having a problem using map layers, below is my requirement:

1. I have two or more map layers to be shown overlapped to each other.
2. One map layer is the base layer which is fetched from server as tilled layer and added to map layer and it contains only satellite images of format JPEG.
3. Second layer which is street layers must be overlapped over base map layer of different languages e.g English, Arabic, french etc.
4. the different language street layers can be turned OFF and ON as per language selected by user.
5. So at any time atmost two layers must be visible one is base map layer and second is any language layer.
6. Language layers of course needs to be of PNG8, PNG32 with transparency enabled so that base map layer also visible.

So now problem is this, as i noticed if base layer is of JPEG format then other layers of different formats e.g PNG then they are not visible. but such layers which has same format as base layers are overlapped properly and visible.

Please reply me to resolve this problem or any other idea is also welcome.

Regards,
Khurram Saleem
0 Kudos
9 Replies
RussRoberts
Esri Notable Contributor
Could you share this map with me? and I can look into how the services are acting. Are you using this web map on your mobile content server or AGOL?
Thanks
Russ
0 Kudos
KhurramSaleem
Emerging Contributor
Thanks for your response. Please find the services which are giving problem.
1. "http://89.211.33.57/ArcGIS/rest/services/StreetsA/MapServer"
2. "http://89.211.33.57/ArcGIS/rest/services/StreetsE/MapServer"
3. "http://89.211.33.57/ArcGIS/rest/services/SatelitteMap/MapServer"

These services currently caching the images. number 3 is the base map layer and other 1 & 2 are different languages layers as i discussed in previous message.

While testing i had seen another behavior. My iphone application shows maps correctly when i just replaced the above URL links with the esri services url as given.
1. "http://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServe..."
2. "http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"

Maps are correctly showing as desired on iphone overlapped to each other.

Its mean it could be the problem of how servers are established?
Please let me know if there is something to do with servers settings?
Or we can resolve this issue at iphone side, by using some strategy?
Or i am implementing in wrong way?
0 Kudos
KhurramSaleem
Emerging Contributor
I am implementing these services developing IOS application using xcode. Below is the code i am using.

self.mapView.layerDelegate = self;
self.mapView.calloutDelegate = self;
   
NSString *URLSatellite_BaseMap = [NSString stringWithFormat:URL_SATELLITE_MAP_BASE_LAYER];
NSString *URLStreet_Map_ARB = [NSString stringWithFormat:URL_STREET_ARABIC_LAYER];
NSString *URLStreet_Map_ENG = [NSString stringWithFormat:URL_STREET_ENGLISH_LAYER];

NSString *URLVector_BaseMap = [NSString stringWithFormat:URL_VECTOR_MAP_BASE_LAYER];

AGSTiledMapServiceLayer * tiledSatelite_BaseMap = [AGSTiledMapServiceLayer tiledMapServiceLayerWithURL:[NSURL URLWithString:URLSatellite_BaseMap]];

AGSLayerView_Satellite_BaseMap = [mapView addMapLayer:tiledSatelite_BaseMap withName:SATELLITE_BASE_MAP_LAYER];
self.AGSLayerView_Satellite_BaseMap.drawDuringPanning = YES;
self.AGSLayerView_Satellite_BaseMap.drawDuringZooming = YES;

AGSTiledMapServiceLayer * tiledStreet_ENG = [AGSTiledMapServiceLayer tiledMapServiceLayerWithURL:[NSURL URLWithString:URLStreet_Map_ENG]];
AGSLayerView_StreetMap_ENG = [mapView addMapLayer:tiledStreet_ENG withName:STREET_MAP_LAYER_ENG];

AGSTiledMapServiceLayer * tiledStreet_ARB = [AGSTiledMapServiceLayer tiledMapServiceLayerWithURL:[NSURL URLWithString:URLStreet_Map_ARB]];
AGSLayerView_StreetMap_ARB = [mapView addMapLayer:tiledStreet_ARB withName:STREET_MAP_LAYER_ARB];


self.mapView.touchDelegate = self;

AGSEnvelope *envelope;

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{     
  envelope = [AGSEnvelope envelopeWithXmin: INITIAL_X_MIN_IPAD ymin:INITIAL_Y_MIN_IPAD xmax:INITIAL_X_MAX_IPAD ymax:INITIAL_Y_MAX_IPAD spatialReference: [AGSSpatialReference spatialReferenceWithWKID:28600]];
}
else
{
  envelope = [AGSEnvelope envelopeWithXmin: INITIAL_X_MIN ymin:INITIAL_Y_MIN xmax:INITIAL_X_MAX ymax:INITIAL_Y_MAX spatialReference: [AGSSpatialReference spatialReferenceWithWKID:28600]];
}


[self.mapView zoomToEnvelope:envelope animated:YES];
0 Kudos
NimeshJarecha
Esri Regular Contributor
If you want to load two tiled layers in a map then they MUST be of same spatial reference. Is your Satellite Base Map's spatial reference is same as Street Arabic and English tiled layers?

Regards,
Nimesh
0 Kudos
KhurramSaleem
Emerging Contributor
Thanks Nimesh for your response.
I had checked and the spatial reference for base map layer is something very strange very long string, and other language layers has 28600.

I will let our server team know that they need to correct spatial reference.

Are you sure this is the problem due to which the maps are not showing correctly?

Have you seen the services links i given you? is there any other mistake?

Regards
Khurram Saleem
0 Kudos
NimeshJarecha
Esri Regular Contributor
Once, you match up the spatial reference of both tiled layer's, they should show up in the map. Let me know how it goes.

Regards,
Nimesh
0 Kudos
KhurramSaleem
Emerging Contributor
Thanks for your reply. Our Server team had contacted to ESRI directly, and they had told that on server some mobile content settings needs to be enable, which currently not enabled, i am not sure what that settings is. But now this is concluded that this problem is at server side. I will update you here as well what they do. So that all can have benefit of that.

Thanks
Khurram Saleem
0 Kudos
KhurramSaleem
Emerging Contributor
Hi Nimesh,

Thanks a lot for your help. It worked and maps are now showing correctly overlapped. On server spatial reference are now kept same for all map layers.

Regards,
Khurram Saleem
0 Kudos
NimeshJarecha
Esri Regular Contributor
Great! You're welcome!

Regards,
Nimesh
0 Kudos