POST
|
Some progress. I have been able to show both type of maps on the screen The way around is to first add the cached layer on the map and then add the dynamic layer. Since I want my cached layer to be selectable by the user, I have then reordered the layers so that the cached (ground) layer comes on the top. Now, my problem is that in the cached map, there are tiles that contain white space (the boundary areas; ie the areas corresponding to ocean shores) These cover the oceans in the dynamic layer (below the tiles) and so, the user can only view the blank (white) spaces near the shores, where the tile is formed. I have thought of a solution to this problem; a. Add the all layers (oceans and neighboring countries) in cached map service. b. Set the map max extent in arcDesktop to cover the ONLY the ground. c. Create 2 services, one tiled (with all layers) and other dynamic (only with oceans and neighboring countries) as before d. Add the layers on the map. Please let me know if this solution is the best available or there is some better option available.
... View more
05-12-2012
10:51 AM
|
0
|
0
|
459
|
POST
|
Hello All, I want to use tiled and dynamic service on a single map. Let me introduce you to the problem and give a background for doing this. I have a map where I am caching the ground areas but due to space constraints, I want to avoid caching the oceans. Now, I have achieved this by restricting the tiles creation using the feature class. The problem is that in this approach, the tiles would keep on growing on larger scales, if the users go to the oceans areas and zoom/pan. So, as a solution, I am trying to use a combination of tiles and caches to avoid this slow but steady increase of space cache takes on disk. I feel that this would be the most common problem on any mapping service, but I have not been able to find a solution to this problem online. I have tried using adding two layers, one tiled other dynamic, to the map, but I cannot view both together on the screen. Only dynamic is shown... Also, firebug shows these errors: [ATTACH=CONFIG]14280[/ATTACH] This is the sample javascript:
function init() {
loading = dojo.byId("loadingImg"); //loading image. id --> Not present, no problem
var extent = getExtent();
initExtent = new esri.geometry.Extent({
"xmin":-100,
"ymin":13,
"xmax":-85,
"ymax":24,
"spatialReference":{"wkid":4326}
}); //spatial reference for lat/long
esriConfig.defaults.map.slider = { left:"10px", top:"10px", width:null, height:"150px" };
map = new esri.Map("map", {extent:initExtent, slider: true});
var imageParameters = new esri.layers.ImageParameters();
imageParameters.format = "JPEG"; //set the image type to JPEG, note default is PNG8.
map.addLayer(new esri.layers.ArcGISDynamicMapServiceLayer("http://192.168.250.75:8399/arcgis/rest/services/surroundings/MapServer"));
ground = new esri.layers.ArcGISTiledMapServiceLayer( "http://192.168.250.75:8399/arcgis/rest/services/mexLoadBal/MapServer");
dynamicMapServiceLayer09 = ground;
var imageParameters = new esri.layers.ImageParameters();
imageParameters.format = "JPEG"; //set the image type to JPEG, note default is PNG8.
var layer = map.addLayer(dynamicMapServiceLayer09);
if (layer == null)
{
alert("map layer is null, could not add map layer to map");
}
map.reorderLayer(ground,0);
dojo.connect(map, "onClick", function(evt) {
map.graphics.clear();
locator.locationToAddress(evt.mapPoint, 500);
});
dojo.connect(map,"onUpdateStart",function(){
esri.show(dojo.byId("status"));
showLoading();
});
dojo.connect(map,"onUpdateEnd",function(){
esri.hide(dojo.byId("status"));
hideLoading();
});
dojo.connect(map, "onExtentChange", showExtent);
dojo.connect(map, "onExtentChange", saveExtgent); // save Extent of the current loaded map
dojo.connect(map, "onMouseMove", showCoordinates);
dojo.connect(map, "onMouseDrag", showCoordinates);
dojo.connect(map, "onLoad", createMenus);
}
/*****************************************/
Regards, Ashish
... View more
05-12-2012
02:49 AM
|
0
|
4
|
4617
|
POST
|
Hi Is it possible to export the graphics added to a map to KML format using java script API. I am adding graphics over a map and now i wish to export this graphics to KML file. Is it possible using java script? Please help. Thanks
... View more
11-25-2011
03:34 AM
|
0
|
3
|
1916
|
POST
|
I am also interested in solution. Kindly share. Thanks
... View more
11-23-2011
02:11 AM
|
0
|
0
|
777
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|