|
POST
|
You can do this by passing in a custom levels of detail when you create your map. There's a sample showing this here: http://arcscripts.esri.com/details.asp?dbid=16956
... View more
04-11-2011
08:49 AM
|
0
|
2
|
5225
|
|
POST
|
Can you post some of your code? If you're using GeometryService.union(), the geometry operation should be happening on the server, not on the client so you shouldn't be getting a warning about slow javascript.
... View more
04-06-2011
01:28 PM
|
0
|
0
|
1049
|
|
POST
|
The simple solution would be to switch to dojo.xhrGet (literally replace "esri.request" with "dojo.xhrGet" and your code should work). The problem has to do with how esri.request() works. When you use esri.request() to do a GET, you're actually doing a dojo.io.script.get(). This function always expects javascript/json and ignores the "handleAs" parameter. When you use esri.request() to do a POST(usually via a proxy), you do are really doing a dojo.xhrPost() which does support a "handleAs" parameter. This is what the sample you referenced is doing- a POST via esri.request() which goes through a proxy to retrieve the text file used in the example.
... View more
04-04-2011
03:19 PM
|
0
|
0
|
984
|
|
POST
|
This is covered in the FAQ. See it in action: Full Map Layout Sample Note that the map div is a dijit.layout.ContentPane.
... View more
03-30-2011
10:16 AM
|
0
|
0
|
563
|
|
POST
|
This sounds like it's probably a bug...contact support?
... View more
03-30-2011
10:14 AM
|
0
|
0
|
690
|
|
POST
|
This is pretty straightforward. You want to set up an event listener on a dom node (or nodes) and call a method to pan the map. Here's an example, pertinent code in red: <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
<title>Topographic Map</title>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.2/js/dojo/dijit/themes/claro/claro.css">
<style>
html, body {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
#map{
padding:0;
}
#panMap {
position: absolute;
left: 10px;
bottom: 10px;
width: 200px;
height: 50px;
background-color: #444;
color: #fff;
z-index: 40;
padding: 5px;
}
</style>
<script type="text/javascript">var djConfig = {parseOnLoad: true};</script>
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.2"></script>
<script type="text/javascript">
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("esri.map");
var map, resizeTimer;
function init() {
var initExtent = new esri.geometry.Extent({"xmin":-13632648,"ymin":4542594,"xmax":-13621699,"ymax":4546875,"spatialReference":{"wkid":102100}});
map = new esri.Map("map",{extent:initExtent});
var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer");
map.addLayer(basemap);
dojo.connect(map, 'onLoad', function(theMap) {
dojo.connect(dijit.byId('map'), 'resize', function() { //resize the map if the div is resized
clearTimeout(resizeTimer);
console.log('resize');
resizeTimer = setTimeout( function() {
map.resize();
map.reposition();
}, 500);
});
});
dojo.connect(dojo.byId('panMap'), 'onmouseover', function() {
map.panLeft();
});
}
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 id="panMap">
mouse over to pan left/west
</div>
</div>
</div>
</body>
</html> Note that the event listener is set up after the map loads. Also, JavaScript, not Java 🙂
... View more
03-29-2011
08:31 AM
|
0
|
0
|
779
|
|
POST
|
setGeometry() is a method so you would do the following: graficoPerfil.setGeometry(graphic.geometry);
... View more
03-29-2011
08:20 AM
|
0
|
0
|
625
|
|
POST
|
Let's stick with your query issues first. I've looked through your code and don't see where something would be going wrong unless the urls to your layers are off. This is what the code is generating for me: http://gisserver/ArcGIS/rest/services/Mapping_MSD/MapServer/3 http://gisserver/ArcGIS/rest/services/Mapping_MSD/MapServer/2 http://gisserver/ArcGIS/rest/services/Mapping_MSD/MapServer/1 Are those urls to the layers you want to query? And do they all have a field named "Total"?
... View more
03-25-2011
01:30 PM
|
0
|
0
|
866
|
|
POST
|
I would say that this is documented, but could probably be improved. If you look at the documentation for map.addLayers(), it says: The onLayerAddResult event fires for each layer that is added. Once all the layers are added to the map the onLayersAddResult fires. But the documentation for map.addLayer() makes no mention of firing the onLayersAddResult.
... View more
03-25-2011
12:53 PM
|
0
|
0
|
1245
|
|
POST
|
I played with this a little but didn't take it too far. I used it in an app that uses web mercator base maps. Maybe someone will find this helpful: http://swingley.appspot.com/phish
... View more
03-24-2011
03:54 PM
|
0
|
0
|
1538
|
|
POST
|
I would encourage you to rethink this design. I would use onmouseover or onclick, but not both (and I would go with onclick). From a practical standpoint, how are you envisioning this would work? For a user to click an icon, they have to mouse over it. It doesn't make sense to do the same thing for onmouseover and onclick.
... View more
03-24-2011
10:58 AM
|
0
|
0
|
1143
|
|
POST
|
Sounds like you're on the right track but forget about eval(), I don't think that is the answer to your problem. Can you post a more complete code sample so we can see exactly what you're doing?
... View more
03-24-2011
10:26 AM
|
0
|
0
|
866
|
|
POST
|
Looks like you got plenty of good answers on the GIS Stack Exchange site.
... View more
03-24-2011
07:51 AM
|
0
|
0
|
511
|
| 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
|