|
POST
|
Taking a closer look at your original code, I see that xmin is actually larger than xmax. That's likely what was causing your issue.
... View more
08-09-2012
10:09 AM
|
0
|
0
|
2683
|
|
POST
|
I changed the values passed to esri.geometry.Extent. Instead of what you posted, I took the values from the default view of the map service here: http://www.geoiddata.com/arcgis/rest/services/Hawk/MapServer?f=jsapi Since that is a page built with the JS API, and the map is available via a global variable named "map", you can open the console and to this:
dojo.toJson(map.extent.toJson());
Which gives you:
"{"xmin":-11216835.021871055,"ymin":3398518.1829228727,"xmax":-10843258.104015714,"ymax":3553770.9280056115,"spatialReference":{"wkid":102100}}"
Remove the leading and trailing double quotes and you can pass that to esri.geometry.Extent, as shown in the link I posted initially.
... View more
08-09-2012
07:23 AM
|
0
|
0
|
2683
|
|
POST
|
Is this what you're going for: http://jsfiddle.net/Vhn45/ Also check out the help topic on working with extents.
... View more
08-08-2012
08:52 PM
|
0
|
0
|
2683
|
|
POST
|
Basically, do not reference anything in the esri namespace until all modules are loaded. Which means waiting dojo.addOnLoad or dojo.ready to fire.
... View more
08-07-2012
02:19 PM
|
0
|
0
|
1861
|
|
POST
|
Would love to see an example of how to use Esri modules without loading the layer file. AFAIK, that's not possible without an un-built version of the API source.
... View more
08-07-2012
07:29 AM
|
0
|
0
|
1423
|
|
POST
|
It might be possible, but I haven't explored it. Have you seen the examples linked from here: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/inside_dojo_amd.html
... View more
08-07-2012
07:04 AM
|
0
|
0
|
1423
|
|
POST
|
Please post your code showing how you create an instance of this class, how you call doFind and how you're saving the return value of doFind. I recommend using this.<class-property> instead of only <class-property> inside your class methods as it's clearer and will help you avoid accidentally creating additional global variables. findTask, findParams, esricMap, and results are all examples of this. Just to be clear, are you using version 1.3 of the API for 3.1?
... View more
08-07-2012
06:52 AM
|
0
|
0
|
1023
|
|
POST
|
This not currently possible as our modules are not fully AMD compliant (yet).
... View more
08-07-2012
06:45 AM
|
0
|
0
|
1423
|
|
POST
|
This thread should be able to help: http://forums.arcgis.com/threads/63406-Custom-Buttons-For-OverviewMap
... View more
08-06-2012
06:57 AM
|
0
|
0
|
662
|
|
POST
|
The idea that the ItemFileReadStore has a limit of 698 records is a strange one. Can you elaborate on how you arrived at that conclusion? Usually when you see issues along the lines of "my query/identify/find task works for xx records but not xx records", you need to configure a proxy. Does your application has a proxy configured?
... View more
08-06-2012
06:55 AM
|
0
|
0
|
572
|
|
POST
|
As far as i am aware, the printing requires your services to be publicly accessible. Are yours? If you're using a print service hosted by Esri, then yes, your services to be printed need to be public. They do not need to be public if you are hosting and using your own print service.
... View more
08-06-2012
06:49 AM
|
0
|
0
|
2079
|
|
POST
|
This will be fixed in the next release, which is probably ~2 months away since we released 3.1 today.
... View more
08-03-2012
05:13 PM
|
0
|
0
|
3161
|
|
POST
|
Glad to help. Version 3.1 still uses Dojo 1.7 (documented at the end of the What's New in 3.1). I am not an Aptana user so I'm not sure what to tell you for Dojo code completion in Aptana 3.
... View more
08-03-2012
11:54 AM
|
0
|
0
|
2949
|
|
POST
|
This looks like a bug. I'll post back here once I can confirm. One possible workaround is to use the minScale and maxScale properties at the ArcGISDynamicMapServiceLayer level. These properties are new with version 3.1 of the API. Here's an example:
<!doctype html>
<html lang="en">
<head>
<meta 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>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.1/js/dojo/dijit/themes/tundra/tundra.css" />
<style>
html, body { height: 100%; width: 100%; margin: 0; padding: 0; }
h3 { margin: 0 0 5px 0; border-bottom: 1px solid #444; text-align: center }
.shadow {
-moz-box-shadow: 0 0 5px #888;
-webkit-box-shadow: 0 0 5px #888;
box-shadow: 0 0 5px #888;
}
#map{ margin: 0; padding: 0; }
#feedback {
background: #fff;
color: #444;
position: absolute;
font-family: arial;
height: 40px;
left: 30px;
margin: 5px;
padding: 10px;
bottom: 30px;
text-align: center;
width: 320px;
z-index: 40;
}
.note { font-size: 80%; padding: 0 0 10px 0; }
#slider {
color: #666;
margin: 5px auto;
padding: 3px;
}
#appSliderLabel { padding: 0 0 10px 0; }
#maxLabel { display: inline-block; margin: 0 0 0 -30px;}
#minLabel { display: inline-block; margin: 0 0 0 30px;}
#breakInfo { padding: 20px 0 0 0; }
</style>
<script>var dojoConfig = { parseOnLoad: true };</script>
<script src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.1"></script>
<script>
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("esri.map");
// one global for persistent app variables
var app = {};
function init() {
var ext, basemap, usaUrl;
ext = new esri.geometry.Extent({"xmin":-14332474,"ymin":3248843,"xmax":-8070752,"ymax":5464906,"spatialReference":{"wkid":102100}});
app.map = new esri.Map("map", {
"extent": ext,
"slider": false
});
dojo.connect(app.map, "onLoad", function() {
dojo.connect(dijit.byId("map"), "resize", app.map, app.map.resize);
dojo.connect(app.map, "onZoomEnd", updateScale);
updateScale();
});
basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer");
app.map.addLayer(basemap);
// set up a layer to show counties as a dynamic map service
// set visible layers to [2]
usaUrl = "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer";
app.usaLayer = new esri.layers.ArcGISDynamicMapServiceLayer(usaUrl, {
"id": "usa",
"opacity": 0.7
});
dojo.connect(app.usaLayer, "onLoad", function() {
app.usaLayer.setVisibleLayers([2]);
app.usaLayer.maxScale = 10000000;
app.usaLayer.minScale = 20000000;
// console.log("set dyn layer infos...", infos);
});
app.map.addLayer(app.usaLayer);
}
function updateScale() {
dojo.byId("map-scale").innerHTML = dojo.number.format(parseInt(app.map.getScale()));
}
function errorHandler(err) {
console.log('Oops, error: ', err);
}
dojo.ready(init);
</script>
</head>
<body class="tundra">
<div data-dojo-type="dijit.layout.BorderContainer"
data-dojo-props="design:'headline',gutters:false"
style="width: 100%; height: 100%; margin: 0;">
<div id="map"
data-dojo-type="dijit.layout.ContentPane"
data-dojo-props="region:'center'">
<div id="feedback" class="shadow">
Map scale: <span id="map-scale">unknown</span>
</div>
</div>
</div>
</body>
</html>
JSFiddle: http://jsfiddle.net/MDvzT/
... View more
08-03-2012
11:48 AM
|
0
|
0
|
3161
|
|
POST
|
We released version 3.1 of the API today which includes a VSDoc that works with Visual Studio 2010 and the 2012 RC. It also works with Aptana 3. You can get it here: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/api_codeassist.htm
... View more
08-03-2012
11:04 AM
|
0
|
0
|
2949
|
| 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
|