|
POST
|
The default spatial reference is dictated by the map service used in the map. if you are using any tiled map service then map spatial reference will be that of the tile map service. If you are using dynamic service it'll be first map service's spatial reference.
... View more
08-15-2014
07:48 AM
|
0
|
0
|
1090
|
|
POST
|
Make sure you are specifying the correct coordiate system when adding your coordinates to your map, if XY data is the first layer on the map then the layer will be added with undefined coordinate system. If your base map and your coordinates are in different coordinate system, if you don't explicitly specify the coordinate system when adding map, arcmap will not be able to correctly project on fly.
... View more
08-15-2014
07:41 AM
|
0
|
0
|
1360
|
|
POST
|
You will need 3D analyst licence for this. Use Surface Aspect tool to create polygon FC with Aspect values ArcGIS Help 10.1 Use Intersect tool to intersect your point features with Aspect polygon. Export as table using Table to Table tool
... View more
08-15-2014
07:33 AM
|
0
|
3
|
1525
|
|
POST
|
Below are my trouble shooting suggestion. One thing that stands out to me is your map unit is meters, chainage column values looks like kilometers. Generally route feature class M values are in meters (technically M values has no units), may be you should convert your KM to M and try creating your route event layer. Use Locating error field to check if there are any error when event layer was created. Use Identify Route measure tool to inspect your route feature class chainages. Customize -> Toolbars -> Customize. Commands tab, search for "Identify route locations", drag the command and drop it on any toolbar (I prefer next to identify in commands toolbar) If your route feature class and event table chainage are consistent and correct and there are no locating errors, your event should be located along the route feature class.
... View more
08-15-2014
07:06 AM
|
0
|
0
|
4262
|
|
POST
|
Hi Nick, The item ID 204d94c9b1374de9a21574c9efa31164 in the example page you shared is a map service and not a map. E.g. Map Service: http://www.arcgis.com/home/item.html?id=204d94c9b1374de9a21574c9efa31164 Web Map: http://www.arcgis.com/home/item.html?id=d5e02a0c1f2b4ec399823fdd3c2fdebd To view your colleagues web map on your application you should simply use var mapid="d5e02a0c1f2b4ec399823fdd3c2fdebd" THIS would be your colleagues web map ID. var mapDeferred = esri.arcgis.utils.createMap(mapid, "map", { mapOptions: { slider: true, nav:false } }); I think ESRI should update documentation for Working with web maps | Guide | ArcGIS API for JavaScript to stress that US soil map example uses map services and not a web map.
... View more
08-15-2014
06:46 AM
|
1
|
0
|
577
|
|
POST
|
Can you post some screenshots for my better understanding on what your issue is.
... View more
08-15-2014
06:13 AM
|
0
|
2
|
4262
|
|
POST
|
Check your route feature class M Resolution possibly, it's >= 1. Also please make sure you are posting your questions to correct forum, Geonet Help forum is for the general form related topic, Best place for your question would be Managing Data. This will help you in getting better help.
... View more
08-15-2014
05:06 AM
|
1
|
4
|
4262
|
|
POST
|
ryan nz wrote:
Owen, I inspected element using google chrom and here is the error:
XMLHttpRequest cannot load http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/Geomet…43794057776715%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D%5D%7D. The 'Access-Control-Allow-Origin' header has a value 'http://localhost:6179' that is not equal to the supplied origin. Origin 'http://example.com' is therefore not allowed access.
The message seems to refer to localhost. Where can I change that?
Hi Ryan, I got the URL from your previous post above. Below modified click event for "good" button. This should work without any issues cross site scripting issues. On(dom.byId("good"), "click", function(evt) { ioScript.get({ url: "http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer/project", // Project URL callbackParamName: "callback", content: { f: "json", outSR: "102100", inSR: "4326", geometries: dojo.toJson({ geometryType: "esriGeometryPoint", geometries: [ // List of your geometries. new Point(174.10266423100921,-39.04732347299239, new SpatialReference({ wkid: 4326 })), new Point(174.10538328709313,-39.04732347299239, new SpatialReference({ wkid: 4326 })), new Point(174.10538328709313,-39.043794057776715, new SpatialReference({ wkid: 4326 })), new Point(174.10266423100921,-39.043794057776715, new SpatialReference({ wkid: 4326 })) ]}) }, load: function (data) { alert(data.geometries.length); }, error: function (error) { alert("asdads"); } }); });
... View more
08-14-2014
07:14 PM
|
0
|
0
|
400
|
|
POST
|
sys.argv[1] - will return you the value of first parameter. In my above example it'll return the value set for the parameter Source.
... View more
08-14-2014
03:27 PM
|
0
|
0
|
2037
|
|
POST
|
Hi ryan, Looks like it's a cross site scripting issue. How are you accessing the rest end point, is it xhrRequest? Have a look at below sample, implementation for button "Good" is one way of doing cross site request, implementation for bad is not.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
<title>Simple Map</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.10/js/esri/css/esri.css">
<style>
html, body, #map {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
body {
background-color: #FFF;
overflow: hidden;
font-family: "Trebuchet MS";
}
</style>
<script src="http://js.arcgis.com/3.10/"></script>
<script>
var map;
require(["esri/map", "dojo/dom", "dojo/on", "dojo/io/script", "dojo/request/xhr","dojo/domReady!"], function(Map, dom, On, ioScript, xhr) {
map = new Map("map", {
basemap: "topo",
center: [-122.45, 37.75], // longitude, latitude
zoom: 13
});
On(dom.byId("good"), "click", function(evt) {
ioScript.get({
url: "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/Geometry/GeometryServer/project?f=json&outSR=102100&inSR=4326&geometries=%7B%22geometryType%22%3A%22esriGeometryPoint%22%2C%22geometries%22%3A%5B%7B%22x%22%3A174.10266423100921%2C%22y%22%3A-39.04732347299239%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D%2C%7B%22x%22%3A174.10538328709313%2C%22y%22%3A-39.04732347299239%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D%2C%7B%22x%22%3A174.10538328709313%2C%22y%22%3A-39.043794057776715%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D%2C%7B%22x%22%3A174.10266423100921%2C%22y%22%3A-39.043794057776715%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D%5D%7D",
callbackParamName: "callback",
load: function (data) {
alert(data.geometries.length);
},
error: function (error) {
alert("asdads");
}
});
});
On(dom.byId("bad"), "click", function(evt) {
xhr("http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/Geometry/GeometryServer/project?f=json&outSR=102100&inSR=4326&geometries=%7B%22geometryType%22%3A%22esriGeometryPoint%22%2C%22geometries%22%3A%5B%7B%22x%22%3A174.10266423100921%2C%22y%22%3A-39.04732347299239%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D%2C%7B%22x%22%3A174.10538328709313%2C%22y%22%3A-39.04732347299239%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D%2C%7B%22x%22%3A174.10538328709313%2C%22y%22%3A-39.043794057776715%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D%2C%7B%22x%22%3A174.10266423100921%2C%22y%22%3A-39.043794057776715%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D%5D%7D", {
handleAs: "json"
}).then(function(data){
alert(data.geometries.length);
}, function(err){
alert("error");
});
});
});
</script>
</head>
<body>
<div id="map">
<button id="good">Good</button>
<button id="bad">Bad</button>
</div>
</body>
</html>
... View more
08-13-2014
10:18 PM
|
0
|
1
|
1864
|
|
POST
|
Hi Lance, Create a String parameter for feature class name and use it in your "Create Feature Class" process as "Feature Class Name" to create an empty feature class. Set input parameter for your script tool of type feature class Access the input parameter in your script line 3 as fc = str(sys.argv[1])
... View more
08-13-2014
04:28 PM
|
2
|
2
|
2037
|
|
POST
|
arcpy.da.SearchCursor (not same as arcpy.SearchCursor) ArcGIS Help 10.1, Input does't have to be a feature class or table, it can be a layer or table.
... View more
08-13-2014
07:21 AM
|
0
|
0
|
967
|
|
POST
|
Looks like the your issue is at line 18. b = sum(row[0] for row in arcpy.da.SearchCursor(fc, 'QUANTITY_SOLID')),DefQ This should be b = sum(row[0] for row in arcpy.da.SearchCursor(fc, 'QUANTITY_SOLID',DefQ))
... View more
08-13-2014
07:00 AM
|
2
|
1
|
4784
|
|
POST
|
Hi Brendan, Your option 2 would be ideal. Reasons: 1. 1500 layer will be a over kill on your server and users, imagine users having to toggle between with 1500 layers. 2. Applying definition query in the MXD and publishing the map service will essentially establish ~75 select query to each of your feature class before the instance can be available for use. This is not just one time cost, everything users zoom in and zoom out it is ~75 selects as well. 3. Applying definition query on your web app will definitely give you a better performance than having a service with 1500 layers.
... View more
08-13-2014
04:38 AM
|
1
|
0
|
1633
|
|
POST
|
Hi Felix, Creating a custom feature layer will not be necessary in your case, however it would be recommended approach if re-usability is important. 1. You can use dojo/store/JsonRest — The Dojo Toolkit - Reference Guide to make a request to your web service. 2. Create a GraphicsLayer on the map graphicslayer-amd | API Reference | ArcGIS API for JavaScript 3. Set renderer on GraphicsLayer for symbology. 4. Build your geometry and attributes from the web service response (assuming the web service returns a well formatted json representation of the geometry). 5. Create Graphics and add to your graphics layergraphicslayer-amd | API Reference | ArcGIS API for JavaScript As far as effort I would say 5 man days tops.
... View more
08-13-2014
03:53 AM
|
2
|
5
|
1567
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-31-2014 06:04 AM | |
| 1 | 09-25-2014 06:03 PM | |
| 1 | 09-16-2014 06:15 PM | |
| 1 | 10-08-2014 03:50 AM | |
| 1 | 08-25-2014 08:33 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:24 AM
|