|
POST
|
Hi all, I am trying to display the legend for a local map service created in my workstation with ArcGIS Server 10. The legend shows using Esri service var dynamicUrl = "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyHazardsandRisks/MapServer"; But it does not show with any of my local services: var dynamicUrl = "http://<myserver>/ArcGIS/rest/services/OneLayer/MapServer"; var dynamicUrl = "http://<myserver>/ArcGIS/rest/services/MapDefault/MapServer"; Is there anything I need to check to see my local ArcGIS Server map services. I am using this template sample http://help.arcgis.com/en/webapi/javascript/arcgis/samples/layout_MapContainerSplitLeft/index.html Thanks
... View more
12-17-2012
06:12 AM
|
0
|
1
|
891
|
|
POST
|
I removed the line and it does the same thing. It has to be related to the local map
dojo.connect(map, 'onLoad', function (map) {
//resize the map when the browser resizes
dojo.connect(dijit.byId('map'), 'resize', map, map.resize);
});
var basemapUrl = "http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer";
//var dynamicUrl = "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyHazardsandRisks/MapServer";
var referenceUrl = "http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer";
var dynamicUrl = "http://<localserver>/ArcGIS/rest/services/OneLayer/MapServer";
var basemap = new esri.layers.ArcGISTiledMapServiceLayer(basemapUrl);
var dynamicLayer = new esri.layers.ArcGISDynamicMapServiceLayer(dynamicUrl, { opacity: 0.45 });
var referenceLayer = new esri.layers.ArcGISTiledMapServiceLayer(referenceUrl);
legendLayers.push({ layer: dynamicLayer, title: "Dolfin" });
dojo.connect(map, 'onLayersAddResult', function (results) {
//add the legend
var legend = new esri.dijit.Legend({
map: map,
layerInfos: legendLayers,
arrangement: esri.dijit.Legend.ALIGN_RIGHT
}, "legendDiv");
legend.startup();
});
map.addLayer(basemap);
map.addLayers([dynamicLayer, referenceLayer]);
dojo.connect(map, 'onLayersAddResult', function (results) {
//add check boxes
dojo.forEach(legendLayers, function (layer) {
var layerName = layer.title;
var checkBox = new dijit.form.CheckBox({
name: "checkBox" + layer.layer.id,
value: layer.layer.id,
checked: layer.layer.visible,
onChange: function (evt) {
var clayer = map.getLayer(this.value);
clayer.setVisibility(!clayer.visible);
this.checked = clayer.visible;
}
});
//add the check box and label to the toc
dojo.place(checkBox.domNode, dojo.byId("toggle"), "after");
var checkLabel = dojo.create('label', { 'for': checkBox.name, innerHTML: layerName }, checkBox.domNode, "after");
dojo.place("<br />", checkLabel, "after");
});
});
}
//show map on load
dojo.addOnLoad(init);
... View more
12-14-2012
11:02 AM
|
0
|
0
|
1175
|
|
POST
|
thanks with map.addLayers([dynamicLayer]); it worked
... View more
12-14-2012
03:44 AM
|
0
|
0
|
728
|
|
POST
|
Hi all I just started downloading this sample "Map container split left" that has a tab with a Legend http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm and replaced the dynamicUrl map service with my service: var dynamicUrl = "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyHazardsandRisks/MapServer"; var referenceUrl = "http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer"; dynamicUrl = "http://<myserver>/ArcGIS/rest/services/OneLayer/MapServer"; When I run it I get instead of the Legend the following error message: "No Legend" The map has a legend I just checked running it in my browser http://<myserver>/ArcGIS/rest/services/OneLayer/MapServer/legend This is the code I am running from the sample: dynamicUrl = "http://<myserver>/ArcGIS/rest/services/WASDDefault/MapServer";
var basemap = new esri.layers.ArcGISTiledMapServiceLayer(basemapUrl);
var dynamicLayer = new esri.layers.ArcGISDynamicMapServiceLayer(dynamicUrl,{opacity:0.45});
var referenceLayer = new esri.layers.ArcGISTiledMapServiceLayer(referenceUrl);
dojo.connect(map,'onLayersAddResult',function(results){
//add the legend
var legend = new esri.dijit.Legend({
map:map,
layerInfos:[{layer:dynamicLayer,title:""}],
arrangement:esri.dijit.Legend.ALIGN_RIGHT
},"legendDiv");
legend.startup();
});
map.addLayer(basemap);
map.addLayers([dynamicLayer,referenceLayer]);
}
... View more
12-14-2012
03:29 AM
|
0
|
6
|
3277
|
|
POST
|
Hi all this is one of my first programs where I am trying to display the legend on a tab what is missing to show the legend. thanks
var dynamicUrl = "http://<server>j/ArcGIS/rest/services/OneLayer/MapServer";
var dynamicLayer = new esri.layers.ArcGISDynamicMapServiceLayer(dynamicUrl );
dojo.connect(map,'onLayersAddResult',function(results){
//add the legend
var legend = new esri.dijit.Legend({
map: map,
layerInfos: [{ layer: dynamicLayer, title: ""}],
arrangement: esri.dijit.Legend.ALIGN_RIGHT
}, "legendDiv");
legend.startup();
});
map.addLayer(dynamicLayer);
}
//show map on load
dojo.addOnLoad(init);
</script>
</head>
<body class="soria">
<form id="form1" runat="server">
<div id="mainWindow" dojotype="dijit.layout.BorderContainer" design="headline"
gutters="false" style="width:100%; height:100%;">
<div id="header" dojotype="dijit.layout.ContentPane" region="top">
This is the header section
<div id="subheader">subheader</div>
</div>
<div dojotype="dijit.layout.ContentPane" id="leftPane" region="right">
<div dojotype="dijit.layout.TabContainer" >
<div id="layersTab" dojotype="dijit.layout.ContentPane" title="Layers" selected="true" style="display: none; margin-bottom: 5px;">
<br />
<div id="layersToc">
</div>
<br />
</div>
<div dojotype="dijit.layout.ContentPane" title = "Legend" >
<div id="legendDiv"></div>
</div>
</div>
</div>
<div id="map" dojotype="dijit.layout.ContentPane" region="center">
</div>
<div id="footer" dojotype="dijit.layout.ContentPane" region="bottom" >
this is the footer section
</div>
</div>
</form>
</body>
</html>
... View more
12-13-2012
10:31 AM
|
0
|
2
|
1098
|
|
POST
|
Hi all I am looking for following source code samples: how to populate a tab with the map legend how to load a TOC in a tab allowing to check layers to make them visible/invisible Thanks
... View more
12-10-2012
09:48 AM
|
0
|
1
|
1104
|
|
POST
|
Hi all Is there a command in Model Bulder that allwos to find all the adjacent polygons for the selected oplygon. I know that in 10 there is Polygon Neighbors thanks
... View more
12-07-2012
03:50 AM
|
0
|
2
|
6325
|
|
POST
|
Thank you! I am now browsing the dojotoolkit.org site and realized that most of the css files such as soria.css are part of the Dojo library so they can be downloaded from this site http://dojotoolkit.org/reference-guide/1.8/dijit/themes.html#id10 I thought that this css files were Esri cutomizations or owned by Esri.
... View more
12-05-2012
10:18 AM
|
0
|
0
|
1709
|
|
POST
|
Hi all I went to the ArcGIS Javascript Map Gallery Configurable Applications page http://help.arcgis.com/en/webapi/javascript/arcgis/help/gallery.html# and I would like to know is these applications are downloadable to configure them as templates in a project. Regards
... View more
12-03-2012
02:49 AM
|
0
|
1
|
821
|
|
POST
|
Hi all I downloaded the StreetView widget for Sample Viewer ESRI http://www.arcgis.com/home/item.html?id=2ba0b738ae2c444f88c69ccd0d37c3f4 but I do not understand how to set it up reading the ReadMe.txt for example 1) Copy image in folder icons\icon\i_streetView.png in folder js\com\esri\solutions\jsviewer\assets\images\icons where is the folder js\com\esri\solutions\jsviewer\assets\images\icons? Thanks
... View more
12-03-2012
02:25 AM
|
0
|
1
|
906
|
|
POST
|
Hi Davide, I can copy the href in my local project and use it, but when deploying the project to a production server, I prefer to have a copy of the CSS files and Dojo files in local to avoid problems of availability on the internet of these files. So my question is to know if there is a way to download the source code of an Esri CSS file or other files. Regards I'm not sure I understand.... why can't you copy the href in your browser and save it in local?
... View more
12-03-2012
01:57 AM
|
0
|
0
|
1709
|
|
POST
|
https://fortress.wa.gov/ecy/waterresources/map/WaterResourcesExplorer.aspx http://geotree2.geog.uni.edu/Tornado/
... View more
12-02-2012
05:52 PM
|
0
|
0
|
801
|
|
POST
|
Jean Pierre, take a look to this map gallery samples: https://fortress.wa.gov/ecy/waterresources/map/WaterResourcesExplorer.aspx
... View more
12-02-2012
05:46 PM
|
0
|
0
|
1185
|
|
POST
|
Hi all In the ArcGIS Javascript library how can I download in local the css files such as: <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.2/js/dojo/dijit/themes/claro/claro.css"> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.2/js/esri/css/esri.css" /> Thanks
... View more
12-02-2012
05:44 PM
|
0
|
5
|
5053
|
|
POST
|
this is what I have found: http://www.arcgis.com/home/item.html...ed64fe0bc63471 http://www.arcgis.com/home/item.html...9bfea8bb5d1bb6
... View more
11-30-2012
10:02 AM
|
0
|
0
|
801
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 3 weeks ago | |
| 1 | 05-01-2026 12:34 PM | |
| 1 | 12-02-2022 08:17 AM | |
| 1 | 12-26-2025 05:02 AM | |
| 1 | 08-05-2025 04:28 AM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|