|
POST
|
You've set up four callbacks to run when onLayersAddResult ... I imagine your initEditing function isn't getting a reference to your editable layers. I recommend using a single callback for onLayersAddResult, filter your layers in your callback and then set up your various widgets.
... View more
07-06-2012
09:03 AM
|
0
|
0
|
1985
|
|
POST
|
Now then, I think there is a small fault in the extras/ClusterLayer.js file included in Esri's sample. There is a line of code that says: alert('Sorry, that cluster contains more than 1000 points. Zoom in for more detail.'); I submit it should say: alert('Sorry, that cluster contains more than ' + this._maxSingles + ' points. Zoom in for more detail.'); As maxSingles is an option provided to the user during configuration of a new ClusterLayer. Thanks, Mark You're right, I'll make the change.
... View more
07-06-2012
07:47 AM
|
0
|
0
|
2532
|
|
POST
|
I'm having a similar problem. Also I am running this from my local file system [ATTACH=CONFIG]15793[/ATTACH] Please use a local web server. It's not realistic to run web apps from your local file system. There are plenty of free options and most OSes come with a web server built-in.
... View more
07-05-2012
11:31 AM
|
0
|
0
|
4575
|
|
POST
|
Steve�?? are you running the sample from your file system or from a local web server?
... View more
07-05-2012
10:23 AM
|
0
|
0
|
4575
|
|
POST
|
I made a lot of changes to get your code closer to working. You'll probably still want to tweak some things, but this should get you started: ???you can load the CSS for various dojo, dijit and dojox components from the Esri CDN, see code below ???dojo.require is used to load modules, regardless of the module's namespace, there's no such thing as dojox.require or djit.require ???Accordion, not Accordian ???use dojoConfig.parseOnLoad: true to have Dojo's parser automatically create your dijits ???use a content pane for the map instead of wrapping the map in a content pane ???I put your floating pane outside of all other dijit.layout widgets ???use data-dojo-type and data-dojo-props instead of dojotype and individual property names <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" /> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/> <title></title> <!-- Load stylesheets--> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.0/js/dojo/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.0/js/dojo/dojox/layout/resources/FloatingPane.css"> <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.0/js/dojo/dojox/layout/resources/ResizeHandle.css" type="text/css"> <style type="text/css"> html, body { height: 100%; width: 100%; margin: 0; padding: 0; } </style> <script type="text/javascript">var djConfig = {parseOnLoad: true};</script> <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.0"></script> <script type="text/javascript"> // dojo.require("esri.vitualearth.VETiledLayer"); dojo.require("dojo.parser"); dojo.require("dojo.domReady"); dojo.require("esri.map"); dojo.require("dijit.layout.BorderContainer"); dojo.require("dijit.layout.ContentPane"); dojo.require("dijit.layout.AccordionContainer"); dojo.require("dojox.layout.FloatingPane"); var map; var veTileLayer; function init() { var initialExtent = new esri.geometry.Extent({ "xmin": -9414173.061, "ymin": 3995118.342, "xmax": -9398289.375, "ymax": 4014748.679, "spatialReference": {"wkid": 102113}}); map = new esri.Map("map", { extent: initialExtent }); veTileLayer = new esri.virtualearth.VETiledLayer ({ bingMapsKey: 'AimF6LphvVcbtQZOyiopeyQT8n-QOTukhwoRZwnzKL1MM0_B1Dfc7ppeKmyPByKp', mapStyle: esri.virtualearth.VETiledLayer.ROAD}); map.addLayer(veTileLayer); dojo.connect(map, 'onLoad', function (map) {dojo.connect(dijit.byId('map'), 'resize', map, map.resize); }); } dojo.addOnLoad(init); </script> </head> <body class="claro"> <!-- floating pane --> <div data-dojo-type="dojox.layout.FloatingPane" id="dFloatingPane" title="Zoom-Bar" data-dojo-props="resizable: false, dockable: true" style="position:absolute;top:5;left:1;width:100px;height:300px;visibility:visible;"> This is the content of the (floating) pane! </div> <div id="appLayout" data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="design: 'headline'" style="width: 100%; height: 100%; margin: 0;"> <!-- top content pane --> <div class="edgePanel" style="height: 50px;" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'top', splitter: true">Header content (top) </div> <!-- center/map content pane --> <div id="map" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'center', splitter: true"></div> <!-- right content pane --> <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'left', splitter: true" style="width: 25%;"> <div dojoType="dijit.layout.AccordionContainer"> <div dojoType="dijit.layout.ContentPane" title="Legend"> <ul> <li> sample title </li> <li> sample title </li> <li> sample title </li> <li> sample title </li> <li> sample title </li> <li> sample title </li> </ul> </div> <div dojoType="dijit.layout.ContentPane" title="Your Bookmarks" selected: "true"> <ul> <li> <b>Sample Bookmark</b> </li> <li> <b>Sample Bookmark</b> </li> <li> <b>Sample Bookmark</b> </li> <li> <b>Sample Bookmark</b> </li> <li> <b>Sample Bookmark</b> </li> <li> <b>Sample Bookmark</b> </li> </ul> </div> </div> </div> </div> </body> </html>
... View more
07-05-2012
10:17 AM
|
0
|
0
|
2573
|
|
POST
|
scopeMap is not supported with 1.7. As mentioned previously, you do not need to load dojo 1.7 yourself�?? it's bundled with the API. Regarding "." vs. "/" in module identifiers, the dot style is still perfectly valid and you'll see that the majority of our samples still use it. That isn't going away until Dojo 2.0. If you're having issues with the new require style of doing things, I would fall back to the older dojo.require style and post specific quesitons along with code to reproduce the issues you're seeing.
... View more
07-03-2012
01:34 PM
|
0
|
0
|
2573
|
|
POST
|
You'll need to publish your table via ArcGIS Server to use it in a JavaScript API app. Since your table is generated per user session, I don't think there's a clean way to do this. Could you modify your architecture to always have a single table that has a user_id column and then filter records from the table based on a user_id? You could then have a process that periodically cleans up your table so it doesn't grow indefinitely. Alternatively, if you know the name of the per-session table, and it's published as a web service, you could use esri.request to send a request to your web service to get your points.
... View more
07-02-2012
01:37 PM
|
0
|
0
|
1123
|
|
POST
|
It's possible and was introduced at 3.0. We are missing info on specifically how to do this in the docs but we'll get it in there. Here's a modified version of our basic legend widget sample that shows this:
<!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">
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" />
<!--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>Map with legend</title>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.0/js/dojo/dijit/themes/claro/claro.css">
<style>
html, body { height: 98%; width: 98%; margin: 0; padding: 5px; }
#rightPane{
width:20%;
}
#legendPane{
border: solid #97DCF2 1px;
}
</style>
<script type="text/javascript">var djConfig = {parseOnLoad: true};</script>
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.0"></script>
<script type="text/javascript">
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.layout.AccordionContainer");
dojo.require("esri.map");
dojo.require("esri.dijit.Legend");
dojo.require("esri.layers.FeatureLayer");
var map;
function init() {
var initialExtent = new esri.geometry.Extent({"xmin":-10753431,"ymin":4624151,"xmax":-10737799,"ymax":4635884,"spatialReference":{"wkid":102100}});
map = new esri.Map("map", { extent: initialExtent});
//Add the terrain service to the map. View the ArcGIS Online site for services http://arcgisonline/home/search.html?t=content&f=typekeywords:service
var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer");
map.addLayer(basemap);
var watershed = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/MapServer");
var waterbodies = new esri.layers.FeatureLayer("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/MapServer/0", {
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
outFields: ["*"]
});
//add the legend
dojo.connect(map, "onLayersAddResult", function(results){
console.log("results: ", results);
var layerInfos = dojo.map(results, function(r) {
var li = {
defaultSymbol: false,
layer: r.layer
};
if ( r.layer.hasOwnProperty("name") ) { // feature layer
li.title = r.layer.name;
} else { // dynamic layer
// hide the waterbodies layer as it's added as a feature layer
li.hideLayers = [0];
}
return li;
});
var legendDijit = new esri.dijit.Legend({
map: map,
layerInfos: layerInfos
},"legendDiv");
legendDijit.startup();
});
map.addLayers([waterbodies, watershed]);
dojo.connect(map, 'onLoad', function(theMap) {
//resize the map when the browser resizes
dojo.connect(dijit.byId('map'), 'resize', map,map.resize);
});
}
dojo.addOnLoad(init);
</script>
</head>
<body class="claro">
<div id="content" dojotype="dijit.layout.BorderContainer" design="headline" gutters="true" style="width: 100%; height: 100%; margin: 0;">
<div id="rightPane" dojotype="dijit.layout.ContentPane" region="right">
<div dojoType="dijit.layout.AccordionContainer">
<div dojoType="dijit.layout.ContentPane" id="legendPane" title="Legend" selected="true" >
<div id="legendDiv"></div>
</div>
<div dojoType="dijit.layout.ContentPane" title="Pane 2" >
This pane could contain tools or additional content
</div>
</div>
</div>
<div id="map" dojotype="dijit.layout.ContentPane" region="center" style="overflow:hidden;">
</div>
</div>
</body>
</html>
The key thing to note is on line 61. The layerInfo object for a layer has a new property defined called "hideLayers". This property is an array of integers. Each integer in the array corresponds to a layer index in a dynamic map service. If a layer's index is present in the hideLayers array, it is not shown in the legend.
... View more
06-28-2012
11:03 AM
|
0
|
1
|
1912
|
|
POST
|
Layers from a map service that are used as the basis for a Feature Layer are required to have ano ID field. If there is not object ID, only a single feature will display. You will need to add an object ID to your layer if you want to use it as a Feature Layer.
... View more
06-28-2012
07:17 AM
|
0
|
0
|
751
|
|
POST
|
CDN, the URL where our API is hosted: http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.0 I'll go take a look at the other thread.
... View more
06-27-2012
06:01 AM
|
0
|
0
|
602
|
|
POST
|
Please try a different forum, either ArcGIS Server �?? General or Network Analyst.
... View more
06-27-2012
05:58 AM
|
0
|
0
|
655
|
|
POST
|
Can this thread be merged with this one http://forums.arcgis.com/threads/60121-Pan-Issues-on-Migrate-to-3.0?p=207528#post207528 As it seems like the same issue I don't think we have the ability to merge threads. The issue that was described in this thread and the other thread you linked to has been fixed in the version of 3.0 currently hosted on our CDN. If you're still seeing a problem, it's probably best to start a new thread that includes code to reproduce the issue.
... View more
06-27-2012
05:56 AM
|
0
|
0
|
2399
|
|
POST
|
Can you post code to reproduce? Which modules are you currently loading via dojo.require? Are you running your code inside a function called by dojo.ready?
... View more
06-26-2012
10:45 AM
|
0
|
0
|
841
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-23-2012 07:54 AM | |
| 1 | 05-28-2010 08:31 AM | |
| 1 | 11-12-2012 08:12 AM | |
| 3 | 02-23-2012 10:57 AM | |
| 1 | 06-27-2011 08:51 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|