POST
|
Thank you Robert for the replay, Is there a workaround for this solution ??? should i use the print widget for example . Thanks Faris
... View more
10-22-2017
02:28 AM
|
0
|
1
|
478
|
POST
|
dear all Am trying to print the custom graphic layer as the cluster point example ESRI JS clustering example using the print task class. the problem i had the is that when printing execute, the print results doesn't show the custom graphic layer (cluster) but showing only the base map layer (dynamic), am using arcgis 10.4 with 3.21 JS version, here is my code for the print functionality. is there something i should consider in my code. function PrintMap() { // print functionality var printURL = "http://arcgissrv/server/rest/services/Utilities/PrintingTools/GPServer/Export Web Map Task"; (not the real url) var printTask = new PrintTask(printURL); // prepare print template var printTemplate = new PrintTemplate(); printTemplate.format = "PDF"; // values pdf | png32 | png8 | jpg | gif | eps | svg | svgz printTemplate.preserveScale = true; printTemplate.label = "print"; // The text that appears on the Print widget's print button. printTemplate.layout = "A4 Landscape"; // values MAP_ONLY, A3 Landscape, A3 Portrait, A4 Landscape, A4 Portrait, Letter ANSI A Landscape, Letter ANSI A Portrait, Tabloid ANSI B Landscape, Tabloid ANSI B Portrait printTemplate.showAttribution = true; printTemplate.showLabels = true; printTemplate.layoutOptions = { // "authorText": dom.byId('txt_PrintMapAuthor').value, "legendLayers": [], "titleText": dom.byId('txt_PrintMapTitle').value, "scalebarUnit": "Kilometers",// 'Miles' | 'Kilometers' | 'Meters' | 'Feet'. Default is "Miles", "Content_text": "AAAAAAAAAAAAAA", }; var printParams = new PrintParameters(); printParams.map = map; printParams.template = printTemplate; // set the function when print task excuted the function fingure print is execute(printParameters, callback?, errback?) printTask.execute(printParams, printResult, printError); function printResult(result) { window.open(result.url) }; // function print result function printError(parm) { alert(parm); }; // function printError
... View more
10-19-2017
03:48 AM
|
0
|
3
|
1160
|
POST
|
Thank you Joshua , Dan and JIM Finally i created the tool which without your suggestions i couldn't make it. def Closest_RD_XY( X, Y, Near_FC , Meters 😞 try: SR = arcpy.SpatialReference(4326)# WGS84 GCS pntFC = arcpy.CreateFeatureclass_management("in_memory", "Acc_FC", "POINT", spatial_reference = SR) # Just to check if layer created or not if pntFC is None: print "FeaClass 'Acc_FC' is not created" #------------------------------------------- In_curs = arcpy.da.InsertCursor( pntFC , ["SHAPE@XY"]) INValue = In_curs.insertRow([(X, Y)]) if INValue < 1 : print "point is not inserted" del In_curs # use the near tool in arcpy arcpy.Near_analysis(pntFC, Near_FC , str(Meters)+ " Meters", "LOCATION","ANGLE","GEODESIC") S_curs = arcpy.da.SearchCursor(pntFC, "*") RD_ID = S_curs.next() # return all information of the nearest feature SN_curs =arcpy.da.SearchCursor(Near_FC, "*", "OBJECTID = " + str(RD_ID[2])) NFeature = SN_curs.next() #delete in memory point layer arcpy.Delete_management (pntFC) return NFeature except Exception as e: return "Error No Road found within 100 Meters 'Error ': " + e.message
... View more
03-27-2017
12:07 AM
|
0
|
0
|
2883
|
POST
|
Thanks Joshua , i tried the tool, it does not take a point object (it needs a feature layer as an input). i need to let the user input the point coordinates in order to search the nearest feature and return its information. unfortunately the two methods (near_analysis, generate near table) are not helping. thanks
... View more
03-04-2017
11:07 PM
|
0
|
2
|
2883
|
POST
|
Thanks a lot Jim. the near tool will add fields to the layer used, am looking for another way which will return only the FIDs so i can loop through them and read information. something like featurecursor interface in arcobjects. thanks again for your replay.
... View more
03-04-2017
01:11 AM
|
0
|
1
|
2883
|
POST
|
hi all, Am looking for a python code to find the nearest feature (street layer) for any given point (x,y) on the map. i need to return the feature id only. #python #arcpy
... View more
03-02-2017
04:10 AM
|
0
|
7
|
4902
|
POST
|
Hi all I have the same problem, i check the symbol and the geometry and thier are fine, but not graphics on the map. Faris
... View more
05-12-2011
01:54 AM
|
0
|
0
|
173
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|