POST
|
Mark - I took a look at your code on the other thread and it looks fine and works with sample service time enabled layers. If you view your service in the services directory and click the JavaScript link does the service display?
... View more
01-14-2011
06:01 AM
|
0
|
0
|
511
|
POST
|
No you don't have to use ArcGIS.com, its just a really easy way to build a map that you plan on embedding into an existing web page.
... View more
01-12-2011
06:21 AM
|
0
|
0
|
2084
|
POST
|
Can you post your code? Perhaps there's something in the code that is causing an issue.
... View more
01-12-2011
06:18 AM
|
0
|
0
|
615
|
POST
|
ArcGIS.com makes it easy to build a map to embed in an existing web site, here's a link to a help topic with instructions: http://help.arcgis.com/en/arcgisonline/help/index.html#//010q00000046000000.htm
... View more
01-11-2011
01:23 PM
|
0
|
0
|
2084
|
POST
|
I tested with both msd and mxd and can't reproduce but I'll keep researching this.
... View more
01-11-2011
07:02 AM
|
0
|
0
|
1624
|
POST
|
I have seen similar issues if I have the 'Enable time on map' button on ArcMap's Time Slider window pressed. The link below is to the server help, can you check your map document in ArcMap and see if the Enable Time on Map button on the Time Slider window is pressed? http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//005z0000000z000000.htm
... View more
01-11-2011
07:01 AM
|
0
|
0
|
615
|
POST
|
One option might be to do something like this:
<script type="text/javascript">
dojo.require('esri.layers.FeatureLayer');
var baseURL;
var map;
function init() {
var initExtent = new esri.geometry.Extent({"xmin":-8590965,"ymin":4695877,"xmax":-8553434,"ymax":4711164,"spatialReference":{"wkid":102100}});
map = new esri.Map("map",{extent:initExtent});
var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");
map.addLayer(basemap);
baseURL = "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer";
esri.request({
url:baseURL,
content:{f:"json"},
callbackParamName:"callback",
load:addLayers,
error:esriConfig.defaults.io.errorHandler
});
}
function addLayers(response,args){
dojo.forEach(response.layers,function(layer){
var featureLayer = new esri.layers.FeatureLayer(baseURL + "/" + layer.id,{
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
outFields: ["*"]
});
map.addLayer(featureLayer);
});
}
dojo.addOnLoad(init);
</script>
... View more
01-07-2011
02:54 PM
|
0
|
0
|
351
|
POST
|
Glen, I made a few changes and here's a working version that uses a full-screen map. Basically I put the Title Pane within the map div tags.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--The viewport meta tag is used to improve the presentation and behavior of the samples
on iOS devices-->
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
<title>
</title>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.1/js/dojo/dijit/themes/claro/claro.css">
<style type="text/css">
html, body { height: 100%; width: 100%; margin: 0; padding: 0; }
#map{
padding:0;
}
</style>
<script type="text/javascript">
var djConfig = {
parseOnLoad: true
};
</script>
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.1"></script>
<script type="text/javascript">
dojo.require("dijit.dijit"); // optimize: load dijit layer
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("esri.map");
dojo.require("esri.virtualearth.VETiledLayer");
dojo.require("dijit.TitlePane");
dojo.require("esri.dijit.BasemapGallery");
dojo.require("esri.arcgis.utils");
dojo.require("dijit.layout.TabContainer");
var map = null;
function init() {
var initExtent = new esri.geometry.Extent({"xmin":-11727455.861413078,"ymin":4861652.558126574,"xmax":-11706340.132349325,"ymax":4871512.934775349,"spatialReference":{"wkid":102100}});
map = new esri.Map("map",{extent:initExtent});
var initBasemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer");
map.addLayer(initBasemap);
createBasemapGallery();
dojo.connect(dijit.byId('map'), 'resize', resizeMap);
}
function createBasemapGallery() {
var basemapGallery = new esri.dijit.BasemapGallery({
showArcGISBasemaps: true,
bingMapsKey: 'Av1bH4keF8rXBtxWOegklgWGCYYz8UGYvBhsWKuvc4Z15kT76xVFOERk8jkKEDvT',
map: map
}, "basemapGallery");
basemapGallery.startup();
dojo.connect(basemapGallery, "onError", function(msg) {console.log(msg)});
}
function resizeMap() {
//resize the map when the browser resizes - view the 'Resizing and repositioning the map' section in
//the following help topic for more details http://help.esri.com/EN/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/inside_guidelines.htm
var resizeTimer;
clearTimeout(resizeTimer);
resizeTimer = setTimeout(function() {
map.resize();
map.reposition();
}, 500);
}
//show map on load
dojo.addOnLoad(init);
</script>
</head>
<body class="claro">
<div dojotype="dijit.layout.BorderContainer" design="headline" gutters="false" style="width:100%;height:100%;margin:0;">
<div id="map" dojotype="dijit.layout.ContentPane" region="center" style="border:1px solid #000;padding:0;">
<div style="position:absolute;width:500px;height:500px; right:175px; top:10px; z-Index:999;">
<div dojoType="dijit.TitlePane" title="Switch Basemap" closable="false" open="true">
<div id="tabContainer" dojoType="dijit.layout.TabContainer" style="width:100%; height:100%">
<div id="one" dojoType="dijit.layout.ContentPane" title="Tab 1" selected="true">
Tab 1 content
</div>
<div id="two" dojoType="dijit.layout.ContentPane" title="Tab 2">
Tab 2 content
</div>
<div id="three" dojoType="dijit.layout.ContentPane" title="Tab 3">
Tab 3 content
</div>
</div>
</div>
</div>
</div>
</body>
</html>
... View more
01-06-2011
06:49 AM
|
0
|
0
|
1176
|
POST
|
Do you have a link to a test app that shows the problem?
... View more
01-05-2011
11:47 AM
|
0
|
0
|
220
|
POST
|
I created a quick test page and wasn't able to reproduce the issue. I have seen a similar issue when trying to display a tab container in a closed title pane, but it doesn't look like that's the case in your code. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--The viewport meta tag is used to improve the presentation and behavior of the samples
on iOS devices-->
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
<title>
</title>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.1/js/dojo/dijit/themes/claro/claro.css">
<style type="text/css">
html, body { height: 100%; width: 100%; margin: 0; padding: 0; }
#map{
padding:0;
}
</style>
<script type="text/javascript">
var djConfig = {
parseOnLoad: true
};
</script>
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.1"></script>
<script type="text/javascript">
dojo.require("dijit.dijit"); // optimize: load dijit layer
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("esri.map");
dojo.require("esri.virtualearth.VETiledLayer");
dojo.require("dijit.TitlePane");
dojo.require("esri.dijit.BasemapGallery");
dojo.require("esri.arcgis.utils");
dojo.require("dijit.layout.TabContainer");
var map = null;
function init() {
var initExtent = new esri.geometry.Extent({"xmin":-11727455.861413078,"ymin":4861652.558126574,"xmax":-11706340.132349325,"ymax":4871512.934775349,"spatialReference":{"wkid":102100}});
map = new esri.Map("map",{extent:initExtent});
var initBasemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer");
map.addLayer(initBasemap);
createBasemapGallery();
dojo.connect(dijit.byId('map'), 'resize', resizeMap);
}
function createBasemapGallery() {
var basemapGallery = new esri.dijit.BasemapGallery({
showArcGISBasemaps: true,
bingMapsKey: 'Av1bH4keF8rXBtxWOegklgWGCYYz8UGYvBhsWKuvc4Z15kT76xVFOERk8jkKEDvT',
map: map
}, "basemapGallery");
basemapGallery.startup();
dojo.connect(basemapGallery, "onError", function(msg) {console.log(msg)});
}
function resizeMap() {
//resize the map when the browser resizes - view the 'Resizing and repositioning the map' section in
//the following help topic for more details http://help.esri.com/EN/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/inside_guidelines.htm
var resizeTimer;
clearTimeout(resizeTimer);
resizeTimer = setTimeout(function() {
map.resize();
map.reposition();
}, 500);
}
//show map on load
dojo.addOnLoad(init);
</script>
</head>
<body class="claro">
<div dojotype="dijit.layout.BorderContainer" design="headline" gutters="false" style="width:100%;height:100%;margin:0;">
<div id="map" dojotype="dijit.layout.ContentPane" region="center" style="border:1px solid #000;padding:0;"></div>
<div dojotype="dijit.layout.ContentPane" region="right" style="width:35%;">
<div dojoType="dijit.TitlePane" title="Switch Basemap" closable="false" open="true">
<div id="tabContainer" dojoType="dijit.layout.TabContainer" style="width:100%; height:100%">
<div id="one" dojoType="dijit.layout.ContentPane" title="Tab 1" selected="true">
Tab 1 content
</div>
<div id="two" dojoType="dijit.layout.ContentPane" title="Tab 2">
Tab 2 content
</div>
<div id="three" dojoType="dijit.layout.ContentPane" title="Tab 3">
Tab 3 content
</div>
</div>
</div>
</div>
</div>
</body>
</html>
... View more
01-05-2011
11:42 AM
|
0
|
0
|
1176
|
POST
|
Sounds good Steve, I'll try a few different tests as well to see if I can reproduce here as well. Hi Kelly, Your legend works fine for me, so I'm not sure what the problem is. Once our web server is outwardly facing I'll get you to try it and see if we can reproduce the problem. Cheers, Steve
... View more
01-04-2011
07:38 AM
|
0
|
0
|
1654
|
POST
|
The sample is in the Feature Layer folder and is called 'Format Info Window', here's the link again hopefully it'll work this time: http://help.arcgis.com/EN/webapi/javascript/arcgis/demos/fl/fl_infowindow.html You can't directly format the dates in the info window at this release, you have to listen for the layer's click event and format the contents of the info window there. At version 2.2 this will no longer be necessary. dojo.connect(featureLayer, 'onClick', function(e) {
/*some of the values have a quote in the name - remove that then split the string
to separate the common and scientific names. */
var attr = e.graphic.attributes.qSpecies.replace('"', "").split("::");
//if the common name isn't included display the scientific name instead.
var commonName = dojo.string.trim((attr[1] === "") ? attr[0] : attr[1]);
//wikipedia uses the genus_species so build that value to append to wikipedia url
var scientificName = dojo.string.substitute("${0}_${1}", attr[0].split(" "));
//populate the info window
map.infoWindow.setTitle(e.graphic.attributes.qAddress);
map.infoWindow.setContent("<b>" + commonName + "</b><br /><a target='_blank' href=http://en.wikipedia.org/wiki/" + scientificName + ">Wikipedia Entry</a>");
map.infoWindow.show(e.screenPoint, map.getInfoWindowAnchor(e.screenPoint));
});
... View more
12-30-2010
08:46 AM
|
0
|
0
|
677
|
POST
|
Steve and Jeff, I updated a service to try and reproduce the problem but my legend doesn't display multiple items. The test service is public: https://servicesbeta.esri.com/ArcGIS/rest/services/SanJuan/Trails/MapServer The Trail Conditions layer has a unique value renderer and I grouped two of the items (maintenance and bridge). I also created a group layer (Trails, Regional Trail Conditions) just in case that was the issue. I then modified the Legend Widget sample from the help to use the San Juan layer and in my tests there are no duplicate items. Is there something in your service that is substantially different?
... View more
12-29-2010
01:20 PM
|
0
|
0
|
1654
|
POST
|
Eric, I haven't noticed this issue, is it only reproducible with a particular version of IE? Any details you can provide on how to reproduce the issue would be helpful. Thanks Kelly
... View more
12-29-2010
07:48 AM
|
0
|
0
|
1240
|
POST
|
At 2.2 we are making some changes to simplify this process but for now here's a sample that shows how to format the contents of an info window. This sample formats string values but could be modified to format numeric or date values. http://help.arcgis.com/EN/webapi/jav...nfowindow.html For date formatting you can use dojo.date.locale.format, the 'Page through records in a table' sample uses this to format date values: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/fl_paging.html
... View more
12-28-2010
07:21 AM
|
0
|
0
|
677
|
Title | Kudos | Posted |
---|---|---|
2 | yesterday | |
1 | 01-17-2025 11:55 AM | |
2 | 01-15-2025 02:08 PM | |
1 | 12-30-2024 02:15 PM | |
1 | 01-19-2022 08:59 AM |
Online Status |
Offline
|
Date Last Visited |
yesterday
|