POST
|
I'm using Angular Esri, version 2 (Angular Esri Map), with the JSAPI version 4.5. I'm creating custom graphic layers with a class break renderer. The colors for each class break include a transparency value. The map includes two feature layers with a simple renderer assigned. These are added to the basemap before any graphics layer. The graphicslayer has a popup template assigned. All the layers are polygons (county boundaries, and aggregated county boundaries), and overlap with each other. When I add the graphics layer to the map as the top layer (index 2), then the graphic's popup displays fine. I would like to show the graphics layer at the bottom beneath the feature layer either index 0 or 1. When I add the graphicslayer to the map with these indexes, the popup does not include the template from the graphics layer. It includes popups from the feature layers. I tried forcing the popup by using the hittest from the mapview click event, but this doesn't create any popup. Is this a bug, or are there any better work arounds? This is the code for the hittest that doesn't work: $scope.mapView.on('click',function(e){ console.log("click event") var screenPoint = { x:e.x, y:e.y } $scope.mapView.hitTest(screenPoint).then(getGraphics); function getGraphics(response){ console.log("getgraphics") console.log($scope.mapView.popup.features) console.log(response.results[1].graphic.attributes) //response.results[1].graphic.popupTemplate.actions.items[0].visible = true; //$scope.mapView.popup.features = [response.results[1].graphic]; $scope.mapView.popup.open({location:screenPoint,features:[response.results[1].graphic]}) } })
... View more
04-24-2018
12:39 PM
|
0
|
0
|
967
|
POST
|
I'm trying to track down an old mapping style that was available through the mapping center. I'm not sure when the style was lost, but it was part of the ArcGIS resources section of the mapping center. I thought I could track it down, but the website has changed significantly and the links all redirect to an ArcGIS resource page. http://mappingcenter.esri.com/ The wayback machine shows what it was like, but the download link doesn't work. It must not have archived the actual downloadable file. It seems to have disappeared betwe3n 2016 and 2017. Esri Mapping Center - ArcGIS Resources The presentation associated with the style is still available here: http://downloads2.esri.com/mappingcenter2007/resources/presentations/buckley_2006_nacis_madison.pdf The blog also discusses it briefly here: The basic building blocks of ArcGIS symbols | ArcGIS Blog If anyone can point me in a direction to download it, I'd appreciate it. Thanks in advance, David
... View more
11-27-2017
10:47 AM
|
0
|
0
|
558
|
DOC
|
I think your code would only be available to 10.3 and up. the parameter.filters property wasn't available in 10.2. Just as an FYI. Otherwise, it looks interesting!
... View more
03-04-2016
09:54 AM
|
0
|
0
|
3564
|
POST
|
If you are using a python add-in wizard, you can do something like this. On the first click, you store the envelopes in a class level property. If the list isn't empty then keep going through and setting extents. This worked on my machine running 10.2 import arcpy import pythonaddins class ButtonClass1(object): """Implementation for zoomto_addin.button (Button)""" def __init__(self): self.enabled = True self.checked = False self.mxd = None self.df = None self.envelopes = [] self.lastIndex = 0 def onClick(self): print "clicked" if len(self.envelopes)<1: self.mxd = arcpy.mapping.MapDocument('CURRENT') self.df = arcpy.mapping.ListDataFrames(self.mxd, "Layers") [0] print "getting stuff" # find the selection set SelLayer = arcpy.mapping.ListLayers(self.mxd,data_frame=self.df)[0] # first layer fidSet = arcpy.Describe(SelLayer).FIDSet if len(fidSet) == 0: arcpy.AddMessage("Nothing selected") else: # now cursor through it an get the geometries # storing their extents into a list with arcpy.da.SearchCursor(SelLayer,"SHAPE@") as SCur: for feat in SCur: # I'm going to assume polygon/polyline self.envelopes.append(feat[0].extent) # grab the envelope print len(self.envelopes) self.lastIndex = 0 self.setExtent else: self.setExtent() def setExtent(self): print len(self.envelopes) print self.lastIndex if self.lastIndex < (len(self.envelopes)-1): self.df.extent = self.envelopes[self.lastIndex] arcpy.RefreshActiveView() self.lastIndex += 1 else: self.lastIndex = 0 self.df.extent = self.envelopes[self.lastIndex] arcpy.RefreshActiveView() self.lastIndex += 1
... View more
07-02-2015
01:35 PM
|
0
|
0
|
372
|
POST
|
In case anyone is interested, the workflow I discovered to duplicate the TIN Tolerance is: Step 1 -> Only if you have multipoints. Assuming a field for the x and y coordinates, and a field for the elevation/depth. Dissolve using the x and y coordinates. Calculate the statistic for the elevation field. The TIN appears to be based on the first value, but you could use MIN, MAX, MEAN or LAST. Step 2 Sort the data based on the SHAPE filed, Ascending, and LL. Step 3 Delete Identical, set the XY tolerance to the same as the Proximal Tolerance. For larger values, it does seem to be the Proximal Tolerance - 1 to exactly duplicate. Step 4 Use the last feature class to create the TIN. I haven't found a method to duplicate the subdivision process when generating contours. Regards, David
... View more
07-02-2015
10:12 AM
|
1
|
0
|
417
|
POST
|
Hello All, I'm working on converting an AML script over to the latest version of ArcGIS. It uses TIN commands extensively to create TINS and Contours. I'm not familiar enough with the old TIN tool to find the equivalent setting sin 3D analyst. For example, the tool sets the weed_tolerance and proximal_tolerance for the CREATETIN tool. These no longer seem to be available as parameters in 3D analyst. I was thinking about thinning the points prior to using them in 3D analyst as a surrogate to proximal_tolerance, but it isn't clear what this tolerance actually does. This is the only description I've found: {proximal_tolerance} - tolerance used to ignore points, nodes and the remaining weeded vertices that fall within the given distance. The default is the machine precision of the computer. The {proximal_tolerance} is set to the greater of two values, either the program-calculated value or the value you enter. weed_tolerance seems applicable only to polylines, and the Generalize tool might work for that. The TINCONTOUR tool has a subdivision degree option that is used, but there doesn't seem to be an equivalent. I thought maybe something with a terrain pyramid might work... Any thoughts? Regards, David
... View more
06-22-2015
10:58 AM
|
0
|
1
|
3137
|
POST
|
I've used network analyst's closest facility tool to calculate the routes from a single incident to 21 facilities. Ending up with 21 routes. I would like to know the name of the streets that the route takes. This information is available from the Directions dialog. Is it possible to export a route as segments with the street names as a attribute? Does anyone know of a good method to get this information? Thank you, David
... View more
06-15-2014
08:48 AM
|
0
|
1
|
1210
|
POST
|
FYI, the Why option is available through the ArcCatalog view rather than ArcToolbox.
... View more
10-29-2012
04:42 PM
|
0
|
0
|
995
|
POST
|
Thanks for the response. I figured out what was missing. But if you have any recommendations for debugging Python Toolboxes, please pass those along. Is the "Why" option available to you? Thanks again, David
... View more
10-24-2012
07:11 AM
|
0
|
0
|
995
|
POST
|
I like the idea of Python Toolboxes, but I have to admit implementing them is not very easy. I'm trying to add a simple toolbox (perhaps simple should be in quotes?) and get a dreaded big red x through the script. According to the help: A tool icon that has been replaced with an error icon (Invalid Script) indicates a failure in the tool. To see an explanation of the problem, right-click the toolbox and click Why. This opens a Python Errors dialog box, which provides the error type and line number. This will cover errors in the tool's __init__, getParameterInfo, or isLicensed methods. Unfortunately, when I do this there is no "Why". I can check the toolbox for syntax errors but there are none. How can find out what is wrong with my code? Also, I tried to search the forums, but no results are returned. Am I missing the ability to search individual forums such as the python forum, or is that not implemented either? Thanks for any guidance. David
... View more
10-23-2012
07:07 AM
|
0
|
9
|
3409
|
POST
|
I think you have it correctly if your map control is named "MapMain". However, v2.1 and earlier do not support Binding for "Resolution", this is new to v2.2 Where is v2.2 available? Thanks, David
... View more
03-02-2011
12:27 PM
|
0
|
0
|
184
|
POST
|
If anyone else is interested, the link above doesn't work, but you can download the javascript api proxy page here: http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jshelp_start.htm#jshelp/ags_proxy.htm I converted this over to vb.net since that is what I'm working in, minus the proxy.config file since I'm not working with tokens for my learning application. I also restricted the proxy to working with a single uri. I don't know if that is the best way to handle it, but in my readings it sounded like a good idea to limit what the page can be used for. I used a generic handler and here is the code for the ProcessRequest Sub. In your map xaml as Ali has done you can add a proxy tag, but just set it to "http://localhost:*current port number*/generichandler.ashx" Your *current port number* may change. Or if you have a server you can host your handler there and change the url accordingly.
Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
Dim response As HttpResponse = context.Response
Dim uri As String = HttpUtility.UrlDecode(context.Request.Url.Query.Substring(1))
If Not uri.Contains(urlStr) Then
response.StatusCode = 500
response.StatusDescription = "Wrong url detected"
response.Write("This proxy page is dedicated to a single url.")
response.End()
Return
End If
Dim req As System.Net.HttpWebRequest = DirectCast(System.Net.WebRequest.Create(uri), System.Net.HttpWebRequest)
req.Method = context.Request.HttpMethod
req.ServicePoint.Expect100Continue = False
If context.Request.InputStream.Length > 0 Then
Dim bytes(context.Request.InputStream.Length) As Byte
context.Request.InputStream.Read(bytes, 0, context.Request.InputStream.Length)
req.ContentLength = bytes.Length
Dim contType As String = context.Request.ContentType
If String.IsNullOrEmpty(contType) Then
req.ContentType = "application/x-ww-form-urlencoded"
Else
req.ContentType = contType
End If
Using outputStream As Stream = req.GetRequestStream()
outputStream.Write(bytes, 0, bytes.Length)
End Using
End If
Dim serverResponse As System.Net.WebResponse = Nothing
Try
serverResponse = req.GetResponse()
Catch webExc As System.Net.WebException
response.StatusCode = 500
response.StatusDescription = webExc.Status.ToString()
response.Write(webExc.Response.ToString())
response.End()
Return
End Try
If Not serverResponse Is Nothing Then
response.ContentType = serverResponse.ContentType
Using byteStream As Stream = serverResponse.GetResponseStream()
If serverResponse.ContentType.Contains("text") Or serverResponse.ContentType.Contains("json") Then
Using sr As StreamReader = New StreamReader(byteStream)
Dim strResponse As String = sr.ReadToEnd
response.Write(strResponse)
End Using
Else
Dim br As New BinaryReader(byteStream)
Dim outb() As Byte = br.ReadBytes(serverResponse.ContentLength)
br.Close()
response.CacheControl = "no-cache"
response.OutputStream.Write(outb, 0, outb.Length)
End If
serverResponse.Close()
End Using
End If
response.End()
End Sub Please let me know of any suggestions for improvement. Cheers, David
... View more
12-30-2010
09:15 AM
|
0
|
0
|
272
|
POST
|
Thanks for your help, that worked for me. I'll add a proxy to my application. Cheers, David
... View more
12-29-2010
10:13 AM
|
0
|
0
|
272
|
POST
|
I don't have access to their servers/service. I found their crossdomain file at http://sunlight.wygisc.uwyo.edu/crossdomain.xml. It seems to provide access to their services. Is there anything that would be prohibiting me from accessing it with silverlight. I don't *think* there is anything wrong with my application since I was able to add a layer from another service and that worked fine. <?xml version="1.0" ?> <!DOCTYPE cross-domain-policy (View Source for full doctype...)> - <cross-domain-policy> <site-control permitted-cross-domain-policies="all" /> <allow-access-from domain="*" to-ports="*" secure="true" /> <allow-http-request-headers-from domain="*.wygisc.uwyo.edu" headers="SOAPAction" secure="false" /> </cross-domain-policy> They don't have a clientaccesspolicy.xml file from what I could tell. Thanks for your response. Cheers, David
... View more
12-29-2010
09:32 AM
|
0
|
0
|
272
|
POST
|
Hello all, I'm learning about using the ArcGIS Silverlight API and am creating a Silverlight 4 Business Application with WCF RIA Services. I would like to use a base map from this service http://sunlight.wygisc.uwyo.edu/ArcGIS/rest/services/Base_Data/MapServer. I'm assuming it is public. Unfortunately everytime this loads I get an error about the cross-domain policy. I'm using Visual Web Developer 2010, .NET 4, Silverlight API 2.1. I've done this before without the error but with a different ArcGIS REST service from a different server. Do I need to add the crossdomain.xml file? If so where would I do that for VWD express? Any help would be appreciated. Cheers, David
... View more
12-29-2010
07:15 AM
|
0
|
5
|
794
|
Title | Kudos | Posted |
---|---|---|
1 | 07-02-2015 10:12 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|