|
POST
|
When I change the extent programmatically, the changes are not added to the extent history so that when I click the Prev Extent button, nothing happens. Is there a way to add to it? Thanks Eric are you using the setExtent method? if so it should get caught by the history. We do this all the time in our app.
... View more
01-25-2012
04:29 AM
|
0
|
0
|
365
|
|
POST
|
I am using this service
map = new esri.Map("mapDiv");
var layer = new esri.layers.ArcGISDynamicMapServiceLayer("http://lrs.co.columbia.wi.us/ArcGIS/rest/services/LRS/TaxParcels_Parcels/MapServer")
map.addLayer(layer);
var expandFactor = 2500
newExtent.xmin = newExtent.xmin - expandFactor;
newExtent.ymin = newExtent.ymin - expandFactor;
newExtent.xmax = newExtent.xmax + expandFactor;
newExtent.ymax = newExtent.ymax + expandFactor;
map.setExtent(newExtent);
I am also getting back the geometry from a query task. I am wondering if there is a way to set the extent so it is not a standard expand factor but instead will expand out only to include the outlying areas of the returned geometry you have two options use the "fit" parameter to force the geometry to fit. map.setExtent(newExtent, true); or use newExtent.expand(1.1) to expand it 1% instead of hardcoding the distance
... View more
01-20-2012
06:41 AM
|
0
|
0
|
482
|
|
POST
|
Farhad, ArcGIS Server 10.1 will support editing against different GDB versions. Accordingly, JavaScript API will implement it. Hope this helps. This is awesome!!!!!!
... View more
01-20-2012
03:58 AM
|
0
|
0
|
640
|
|
POST
|
Hopefully this may help. http://gis.valleywater.org/Alert/ Thank you so much, perfect.
... View more
01-18-2012
06:12 AM
|
0
|
0
|
494
|
|
POST
|
I have spent 2 days on what i think is something simple. My Query is not working in the onclick function and i think it has something to do with my extents being defined wrong, but i'm not sure - i have checked the forums and have not seen similar issues. I was hoping one of you might see something simple in the attached file: Here is my extent definition: var startExtent = new esri.geometry.Extent({"xmin":-74.487856,"ymin":40.849173,"xmax":-73.487856,"ymax":40.649173,"spatialReference":{"wkid":2263}}); Here is the onclick block - feature,length always comes back as 0. dojo.connect(map, "onClick", function(evt) { selectQuery.geometry = evt.mapPoint; waterHydrantsFL.selectFeatures(selectQuery, esri.layers.FeatureLayer.SELECTION_NEW, function(features) { if (features.length > 0) { //store the current feature updateFeature = features[0]; map.infoWindow.setTitle(features[0].getLayer().name); map.infoWindow.show(evt.screenPoint,map.getInfoWindowAnchor(evt.screenPoint)); } else { map.infoWindow.hide(); } }); }); thanks I see you are using a point to select. Remember if you are clicking on a point or a line (basically anything but in a poly) it would have to be PERFECT to satisfy the query. I recommend buffering the point a couple units.
... View more
01-18-2012
04:45 AM
|
0
|
0
|
815
|
|
POST
|
Does anyone know any sources for live (dynamic) weather rasters that can be consumed using the javascript API ? The question comes up occasionally and we have yet to find a satisfactory solution. I am in Florida, if that matters, and looking for weather at the 12-19 scales.
... View more
01-06-2012
07:35 AM
|
0
|
3
|
894
|
|
POST
|
map.setExtent(esri.graphicsExtent(SearchPar[0].features).expand(5.2), true); The application focuses on the area of the map the end user selected and than expands back out. However the zoom level is not consistent if the area of the map is larger or smaller . For instance if the end user wants to see all the adjacent areas within a mile for a piece of property zoom will show this if it is a large section but not if it is a smaller section. So I am wondering if there is a way to make the focus consistent so the user can see the same things if the focus is on a large or small property. First, are you using tiled or dynamic services. If tiled, remember that you are snapping to a particular tile level and therefore can't go "exactly" 1 mile out. I will assume tiled since you are referring to levels. If you always want to go out 1 mile, you shouldnt be using the expand command. Expand using the current extent and a ratio. Below expands a given extent a given distance var expandFactor = /* half of whatever distance in map units */;
var newExtent = new esri.geometry.Extent({"xmin":map.extent.xmin-expandFactor,"ymin":ymin-expandFactor,"xmax":xmax+expandFactor,"ymax":ymax+expandFactor,
"spatialReference":map.spatialReference});
map.setExtent(newExtent);
... View more
01-06-2012
03:55 AM
|
0
|
0
|
391
|
|
POST
|
I am explaining here the issue in more detail I have an Asp.Net MVC Application. There I am trying to integrate the ArcGIS JavaScript Basic Viewer. I already configured the ArcGIS Javascript API 2.6 in my Asp.Net application as below here [ATTACH]10821[/ATTACH] I have Default.ashx inside jsapicompact folder as mentioned in install.htm of ArcGIS Javascript Api downloaded content. I am using this script reference. <script type="text/javascript" src="http://localhost/myapplication/scripts/arcgis_js_api/library/jsapicompact/default.ashx�?� > Instead of <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.6compact"> Here is my dojoConfig var djConfig = { parseOnLoad: true, locale:"en-us", baseUrl: './', modulePaths: { "esriTemplate": "../../../Modules/ArcGISMaps/Scripts" } }; The problem is I am not able to make Basic Viewer to work with local ArcGIS Javascript Api. I am getting some error in loading dojo scripts and ArcGIS javascript Api Scripts. Please help me how to configure the basic viewer with local ArcGIS Javascript Api (http://localhost/myapplication/scripts/arcgis_js_api/library/jsapicompact/default.ashx) Instead of Online api (http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.6compact) it should just be <script type="text/javascript" src="http://localhost/myapplication/scripts/arcgis_js_api/library/2.6/jsapi/?v=2.6compact�?� > unless you changed the folder structure
... View more
01-03-2012
07:25 AM
|
0
|
0
|
656
|
|
POST
|
YEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA! Thank you. took a little more tweaking, but it works now. Thank you. thank you! I love these forums. Agreed. Glad to help.
... View more
01-03-2012
07:08 AM
|
0
|
0
|
505
|
|
POST
|
Hi, In Silverlight API (map.rotation = double value;) we can rotate a map very easily, but I need to do that in JS Api. Is it possible in JS Api? I have been looking for this as well, as far as I can tell it is not currently possible.
... View more
01-03-2012
05:54 AM
|
0
|
0
|
2040
|
|
POST
|
building from the example here: http://help.arcgis.com/en/webapi/javascript/arcgis/demos/find/find_map_datagrid.html I have a dropdown menu, to create a variable. My intention is to be able to search on more than one feature class/"find task" Here is the code from within <body> for the dropdown menu:
<div id="rightPane" dojotype="dijit.layout.ContentPane" region="right">
<form>
Search by :
<select id="myList" onchange="searchQual()">
<option></option>
<option>District</option>
<option>Division</option>
</select>
<p><input type="text" id="searchQualVal" size="0"></p>
</form>
Search Value: <input type="text" id="searchVal" size="10" value="1068"/>
<button data-dojo-type="dijit.form.Button" data-dojo-props='onClick:function(){ doFindFunc();}, value:"Search"'>
Search
</button>
and im trying to use the values "searchQual" and "searchQualVal" to here:
function doFindFunc() {
//Set the search text to the value in the box
findParams.searchText = dojo.byId("searchVal").value;
//it never gets into this switch
switch (searchQualVal){
case "District":
findDistrict.execute(findParams,showResults);
break;
case "Division":
findDivision.execute(findParams,showResults);
break;
};
};
please help! Thank you. dojo.byId("searchQualVal").value;
... View more
01-03-2012
05:50 AM
|
0
|
0
|
505
|
|
POST
|
Take an ESRI's example: http://help.arcgis.com/en/webapi/javascript/arcgis/demos/find/find_popup.html. Ideally, if I click a feature, the feaure should be highlighted and an infobox displays the information. However, when I work on my browser (IE), only the infobox display but no graphic is drawn on the map. I have tested multiple ESRI's samples and always got nothing on the graphics. In another word, Geometry service does not work at all. However, if I run the samples of Flex API, the graphics display well. Is anything missing on my system? Thanks. I tried that sample with IE7, Chrome, Firefox and Safari and graphics displayed on all of them. What version of IE are you using? IE6 is not supported.
... View more
12-22-2011
04:42 AM
|
0
|
0
|
528
|
|
POST
|
Ah, I misinterpreted your initial post. I was thinking you were suggesting that if they put NY in first, then LA, that we measure west-to-east starting from NY and going the long way around the globe. Now I see you meant to exchange the values in geom1 and geom2 and call the task normally. That might be possible using the alternate method, if I could figure out how to determine which point is "west" of the other (especially if you're measuring more than halfway around the globe). I contend I shouldn't have to do that, though, if the Distance task worked across the IDL. Completely agreed that you shouldn't have to. I write alot of code I shouldn't have to as well (primarily if(dojo.isIE){})
... View more
12-21-2011
10:49 AM
|
0
|
0
|
1321
|
|
POST
|
That's not ideal. The user should be able to specify whether they want to measure east-to-west or west-to-east. If a user wants to know the distance from NY to LA, they should get the same result whether they pick NY or LA as their starting point. Very much agreed. I was not suggesting you tell the user to measure west to east, but for you as a developer to check the points prior to submitting them to the calculation and swap them behind the scenes.
... View more
12-21-2011
10:34 AM
|
0
|
0
|
1321
|
|
POST
|
I don't think that's what I want...for example, using the method you prescribed, the distance from Wyoming to Nevada is 10,000 miles. Basically I want the user to be able to click on the map, then click a second point, anywhere in the world, and have it return a distance. The distance method of the Geometry Service does that quite nicely for our needs, especially with the distanceParam.geodesic set to true, except whenever a measurement spans the IDL (even if it's a very small measurement), I get "null miles" back. Is it a bug of the GeometryService's Distance method that it fails to work across the IDL? Because if that worked, that would be the functionality I need for my app. A bit of a hack, but would it be possible to check geom1 and geom2, and if east to west, switch them so measurement is always west to east?
... View more
12-21-2011
10:23 AM
|
0
|
0
|
1321
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-22-2014 08:35 AM | |
| 1 | 05-02-2012 04:56 AM | |
| 1 | 10-29-2021 07:40 AM | |
| 1 | 10-28-2021 05:26 AM | |
| 1 | 07-17-2012 08:48 AM |
| Online Status |
Offline
|
| Date Last Visited |
03-01-2022
02:00 PM
|