POST
|
You could put your map and image in a layoutless container like group or border container. <bordercontainer> </bordercontainer> <group> <map> <image> </group> <bordercontainer> </bordercontainer>
... View more
05-30-2013
05:10 AM
|
0
|
0
|
215
|
POST
|
I have a situation that requires a little guidance. I am creating a phone/tablet app that will provide a method for the user to click on a location and get information about that location. I would like to provide a method for them to get directions to the location, and auto update as they drive. With the existing Esri Network Analysis services being decommissioned in favor of the new World Routing service, which requires an ArcGIS Online subscription, how do I take advantage of this new service? Do I have to create a single account for my app and pay for this feature, or do I have to have a user log in screen so the users can use their own individual accounts?
... View more
05-22-2013
09:36 AM
|
0
|
0
|
498
|
POST
|
I am trying to set up a map element to have both a local tiled layer and a tiled map service layer and all I get is a blank white box instead of the maps. What I am ultimately trying to do is support online and offline with no user interaction, if there is no internet access, use the local tiled layer, if there is use the Tiled map service. But, I can't seem to get it to work in this most basic sense. I have tried adding the layer at runtime and I get the same blank white box.
... View more
05-07-2013
09:39 AM
|
0
|
0
|
533
|
POST
|
I am working on my first Python Add-In and am having a couple issues. What I am trying to do is create a tool that will allow the user to click somewhere on the map and take the map coordinates to create a circle with a predefined radius, fill out some default values, insert it into a SDE feature class, then select the feature to display it's attributes in the attribute editor. This all works pretty well. The problem is related to editing. I would like for the tool to be disabled if the feature class is not editable or if the layer is not in the current map document. I am also struggling with the edit state. If I start editing and run my tool I get this message: The requested operation is invalid on a closed state. If I make at least one edit, I can run the tool just fine.
def onMouseDownMap(self, x, y, button, shift):
mxd = arcpy.mapping.MapDocument('current')
df = arcpy.mapping.ListDataFrames(mxd, 'Layers')[0]
fc = ''
for lyr in arcpy.mapping.ListLayers(mxd,'*', df):
if lyr.supports("dataSource"):
lyrSource = lyr.dataSource.split("\\")
if lyrSource[3] == 'zodiac.GIS.IPCoROW':
fc = lyr.dataSource
rowLayer = lyr
break
# set the radius of the circle
radius = 20
# set the number of sides/vertices the circle will have
side_count = 40
# create the degrees for the circle
degrees = 360 / side_count
# create a list to hold each vertice point for the circle
cir_poly = []
# loop through the number of sides
for i in range(side_count):
# set the angle for the current vertice
angle = (degrees * i) * (math.pi / 180)
# do some math to set the xFactor and the yFactor
xFactor = math.sin(angle)
yFactor = math.cos(angle)
# set the x and y vertices
xVal = radius * xFactor + x
yVal = radius * yFactor + y
# create a arcpy point
pnt = arcpy.Point(xVal,yVal)
# add the point to the list
cir_poly.append(pnt)
# create an array and add the list to it
array = arcpy.Array([cir_poly])
# create a polygon from the array of points
polygon = arcpy.Polygon(array)
# set the path to the IPCoROW layer
#fc = r"Database Connections\Connection to landbaseProd.sde\zodiac.GIS.Land\zodiac.GIS.IPCoROW"
if len(fc) > 0:
try:
# create the insert cursor to be used to add our new circle
print 'Create Insert Cursor'
with arcpy.da.InsertCursor(fc, ["SHAPE@","OwnerType","ConvType","SOURCE","Comments"]) as c:
# insert the circle with attributes into the IPCoROW layer
print 'Insert Row'
i = c.insertRow([polygon, 'ROW','Easement','DIGITIZED','INSUFFICIENT DATA'])
print 'OID =',i
# refresh the active view to show the new feature
arcpy.RefreshActiveView()
print 'Select Features'
arcpy.SelectLayerByAttribute_management (rowLayer, "NEW_SELECTION", "OBJECTID = " + str(i))
except Exception, e:
# if there was an error, print it here
# common errors include:
# attempting to edit outside an edit session
# attempting to edit prior to making any other edits
print 'Error -', e
finally:
pass
else:
print 'Could not find zodiac.GIS.IPCoROW'
... View more
04-02-2013
09:56 AM
|
0
|
2
|
3476
|
POST
|
This seems the way to go Casey. Do you more examples or a more complete example that you can share? Thank you so much! This should get you on your way. Just modify it to handle your workflow and data
private var inspections:FeatureLayer = new FeatureLayer("http://" + Model.instance.serverHost + "/ArcGIS/rest/services/Delivery/T_Inspections/FeatureServer/1");
protected function init():void{
inspections.addEventListener(FeatureLayerEvent.EDITS_COMPLETE, inspections_editsCompleteHandler);
inspections.addEventListener(FeatureLayerEvent.EDITS_STARTING, inspections_editsStartingHandler);
inspections.addEventListener(FaultEvent.FAULT, inspections_faultHandler);
}
/* function used to create inspection records */
protected function btn_createInspection_clickHandler(event:MouseEvent):void{
//Modify this portion to meet your requirements.
const inspection:Object = {
GISONUMBER: item.GISONUMBER.toString(),
INSPECTIONDATE: df_dateInspected.selectedDate.time,
PATROLMANID: dd_patrolmanID.selectedItem.PATROLMANID.toString(),
PATROLTYPE: dd_patrolType.selectedItem.TYPECODE.toString(),
LINENUMBER: dd_lineNumber.selectedItem.ID.toString()
};
const g:Graphic = new Graphic(null,null,inspection);
inspections.applyEdits( , null, null, true);
}
/* function used to handle when editing of inspections starts */
protected function inspections_editsStartingHandler(event:FeatureLayerEvent):void{
CursorManager.setBusyCursor();
}
/* function used to handle when editing of inspections completes */
protected function inspections_editsCompleteHandler(event:FeatureLayerEvent):void{
try{
var flag:Boolean = true;
var result:FeatureEditResult;
for each(result in event.featureEditResults.addResults){
if (!result.success)
flag = false;
}
if(flag)
Alert.show('Created - ' + event.featureEditResults.addResults.length.toString() + ' inspection records', 'info');
else
Alert.show('Some inspection records failed to create, rolling back edits','warning');
CursorManager.removeBusyCursor();
}catch(error:Error){
CursorManager.removeBusyCursor();
}
}
/* function to handle when editing inspections faults */
protected function inspections_faultHandler(event:FaultEvent):void{
Alert.show(event.fault.faultDetail, 'fault');
CursorManager.removeBusyCursor();
}
... View more
02-05-2013
01:27 PM
|
0
|
0
|
351
|
POST
|
Do I have to create the webservice in Visual Studio? If so, I would prefer to use a geodatabase. Do you know of any examples? Thanks For a web service, you would have to use visual studio or visual web developer express. If you have an SDE geodatabase, you can just create a table, register it with the geodatabase and register it as versioned. Then add it to an MXD, publish it to ArcGIS Server with Feature Access enabled. Then in your Flex application you can create a feature layer pointed at the service. Then each time a user enters a value, you can create an object with the same fields as your table and add it to the graphic.attributes. var inspections:FeatureLayer = new FeatureLayer("http://" + Model.instance.serverHost + "/ArcGIS/rest/services/Delivery/T_Inspections/FeatureServer/1"); inspections.addEventListener(FeatureLayerEvent.EDITS_COMPLETE, inspections_editsCompleteHandler); inspections.addEventListener(FeatureLayerEvent.EDITS_STARTING, inspections_editsStartingHandler); inspections.addEventListener(FaultEvent.FAULT, inspections_faultHandler); var arr:Array = new Array(); for each(var item:Object in l_structures.selectedItems){ const inspection:Object = { GISONUMBER: item.GISONUMBER.toString(), INSPECTIONDATE: df_dateInspected.selectedDate.time, PATROLMANID: dd_patrolmanID.selectedItem.PATROLMANID.toString(), PATROLTYPE: dd_patrolType.selectedItem.TYPECODE.toString(), LINENUMBER: dd_lineNumber.selectedItem.ID.toString() }; const g:Graphic = new Graphic(null,null,inspection); arr.push(g); } inspections.applyEdits(arr, null, null, true);
... View more
02-05-2013
12:48 PM
|
0
|
0
|
351
|
POST
|
Yes, thanks! I am having this same problem. Any ideas on how to fix this?
... View more
02-05-2013
12:29 PM
|
0
|
0
|
674
|
POST
|
What kind of database do you have to store it in? If it is an SDE database you could used ArcGIS Server and a Feature Layer. If it is a non geodatabase database like SQLite or something like that, you could use a web service.
... View more
02-05-2013
12:26 PM
|
0
|
0
|
351
|
POST
|
Hi, I need to create tile packages using my own scales, in the early beta version I could do it directly from the 'Share As' 'Tile Package' menu item. Currently I can only use predefined values, which would be fine if I could modify both the 'highest level of detail' and the 'lowest level of detail'. However using a very simple map document (1 layer) and 1 scale value, it works. I've also tried using a tiling scheme file (ArcToolbox - Generate MapServer Cache Tiling Scheme), again using my simple document and 1 scale value. That generates no errors. However, when I use the xml file as the Tiling Scheme, Analyze gives no errors, but as soon as I say share, I get a pop-up, that says 'Invalid function arguments'. Finally I tried ArcToolbox - Create Map Tile Package, using all the same parameters. It gives me an Error 999999 : Error executing function. Am I doing something wrong? Andrew Purkis Andrew, I am having this same problem. Did you figure out how to solve this?
... View more
01-16-2013
09:09 AM
|
0
|
0
|
413
|
POST
|
It is still not working. #Fail Esri, you should take note, this happens EVERY time you post something for download. Find a better way!!! Casey
... View more
12-14-2012
06:29 AM
|
0
|
0
|
351
|
POST
|
I would like to use the attribute editor component to create an attributed related record. But, I am not sure how to set this up. The Esri example of creating a related record does not use the attribute inspector, so I can't use that as my starting point. I would like the user to select a feature, then click a button to create a related record. To create that related record, I would like to use the attribute inspector so I can use the default editing components, all my fields are domained. As of now, I am just creating an object of all the attribues, creating a graphic, assigning that object to the graphic's attributes property, then using a feature layer to apply the edits.
... View more
08-16-2012
08:39 AM
|
0
|
0
|
464
|
POST
|
I would like to expand on Greg's answer. I used his method successfully, but think some added detail might help some others. Here are my steps. I created a file geodatabase and imported the feature class from SDE I added the field count Type Short Integer I calculated the field with the value of 1 I ran the intersect tool adding the same polygon feature class twice I then ran the delete identical tool For the fields parameter I used Shape and the FID of the original feature I did this because I found the same polygon was duplicated in my overlap areas, but not outside my overlap areas I then ran the Multipart to Singlepart tool on the output of the intersect After the intersect, I appeared to have multipart features I then ran the Dissolve tool using shape_area and shape_length as my dissolve fields I used the count field as the statistics field with sum as the statistic type This gave me an accurate count of overlapping polygons For my use, I ran the polygon to raster tool to use in further analysis Hi Nick, We've done something similar, but without using rasters. First, add an integer item called COUNT to your polygon feature. Then use the Intersect tool to intersect your polygon layer on itself. Then use the Dissolve tool, and add the COUNT item as the Statistics field and set the Statistics Type to SUM. This should output a polygon layer with the number of overlapping features captured in the COUNT field. I hope this helps, Greg Wise Department of Planning and Local Government South Australia
... View more
08-01-2012
08:10 AM
|
0
|
0
|
1238
|
POST
|
Just a wild guess here. I would assume that you using the AsyncResponder overrides the edits complete event for the feature layer. Have you tried just doing featureLayerFiche.applyEdits(null, [feature], null); That is how I do it outside of the attribute inspector, and it works everytime. Hello everyone, I'm currently trying to update a feature layer without attribute inspector (gave up with the attribute inspector / editor since I had no control over it for the interface). My first problem is the following : I have an error with my applyEdits : Invalid graphic features, Invalid parameters And I just found out why, it's because one of my field is a date with a format like 2012/06/13 04:00:00 UTC and I was trying to update it with a 2010-01-01 format. My second problem is the following : So without the date, the applyEdits goes into the onResult but, no changes have been made to the feature layer and it doesn't even trigger the editComplete nor editsStarting events from the feature layer. Here's the code :
feature.attributes={OBJECTID:gr.attributes.OBJECTID,
RESP_PERQ:strRespPerq,
RESULT:strResultatF,
NBR_PLANTS:strNbrPlant,
RAISON:strRaison,
CONFUSION:strConfusion};
featureLayerFiche.applyEdits(null, [feature], null, new AsyncResponder(onResult, onFault));
function onResult():void
{
Alert.show("ONRESULT");
}
function onFault(info:Object, token:Object = null):void
{
Alert.show(info.toString());
}
// LOAD OF CODE
...
//
<esri:FeatureLayer id="featureLayerFiche"
mode="snapshot"
outFields="[OBJECTID, IDFICHE, NM_MUN, UNITE, DISTRICT, DATEFICHE, RESP_PERQ, DATE_PERQ, RESULT, NBR_PLANTS, RAISON, CONFUSION]"
selectionComplete="myFeatureLayer_selectionCompleteHandler(event)"
editsComplete="featureLayerFiche_EditsCompleteHandler"
editsStarting="featureLayerFiche_EditsStartingHandler"
fault="featureLayerFiche_FaultHandler"
disableClientCaching="true"
url="http://myserver123/ArcGIS/rest/services/geocisaille/FeatureServer/1"/>
// LOAD OF CODE
...
//
So I'm just wondering why it doesnt trigger my events if it went into the onResult function. *Also, I tried to place the [feature] in the delete array and it works, so I can delete feature with no problem.* Any help would be greatly appreciated, since there's not alot of docs about it. Lmk if you need more informations.
... View more
06-14-2012
05:06 AM
|
0
|
0
|
2266
|
POST
|
I am getting an error message that I have never seen before. I am using a datagrid to hold the attributes, including the geometry of a graphic, and allowing the user to double-click the row to zoom to the feature. On some features when I zoom in from the full extent, the screen goes black then white with a big exclamation point in the center. However, when I zoom in and then try to double-click to zoom there is no error. I have found an Adobe forum post, http://forums.adobe.com/thread/693187, pointing out that this is the out of memory notification of the Flash player. The error you are seeing is the new out of memory notification. It is basically shielding the user when memory usage gets near the system resource cap. The best course of action here (if you own the content) is to check your application for high memory usage and correct the errors. If you don't own the content, it would probably be best to contact the owners and make them aware of the issue you are seeing. Could memory really be the issue in such a simple application? I have included a short video clip of what happens.
... View more
03-19-2012
09:47 AM
|
0
|
6
|
777
|
POST
|
I am attempting to use the find task to search an entire service for a value. I search 4 fields from 22 layers (3 of which are group layers) using the contains parameter = true. When I send a request that I know is going to return a large number of results (around 1000) it times out. If I narrow that search it does not time out. And sometimes the larger request works. I set my timeout to 180 seconds and my max returned records to 2000 for the service. In a browser through the REST services folder running on the ArcGIS Server host machine I get the more detailed error message indicating the request timed out. [h=2]Request timed out.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: Request timed out. Source Error: [TABLE="width: 100%"] An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. [/TABLE] Stack Trace: [TABLE="width: 100%"] [HttpException (0x80004005): Request timed out.] [/TABLE] In Flex I see this while debugging: faultCode - Server.Error.Request faultString - HTTP request error faultDetail -Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://freedom/ArcGIS/rest/services/Dispatch/DistQueryLayer/MapServer/find?searchText=MORA44&f=json&returnGeometry=true&sr=102100&searchFields=Breaker%20Number%2CDevice%20Number%2CLocation%20Number%2CSwitch%20Number&contains=true&layers=0%2C1%2C2%2C3%2C4%2C5%2C6%2C7%2C8%2C9%2C10%2C11%2C12%2C13%2C14%2C15%2C16%2C17%2C18%2C19%2C20%2C21%2C22" errorID=2032]. URL: http://servername/ArcGIS/rest/services/Dispatch/DistQueryLayer/MapServer/find?searchText=MORA44&f=json&returnGeometry=true&sr=102100&searchFields=Breaker%20Number%2CDevice%20Number%2CLocation%20Number%2CSwitch%20Number&contains=true&layers=0%2C1%2C2%2C3%2C4%2C5%2C6%2C7%2C8%2C9%2C10%2C11%2C12%2C13%2C14%2C15%2C16%2C17%2C18%2C19%2C20%2C21%2C22
... View more
03-13-2012
07:43 AM
|
0
|
3
|
1158
|
Title | Kudos | Posted |
---|---|---|
1 | 12-21-2010 11:49 AM | |
1 | 01-18-2011 03:48 AM | |
37 | 12-10-2010 08:06 AM |
Online Status |
Offline
|
Date Last Visited |
11-16-2023
07:50 AM
|