POST
|
Hi Heather, Thank you for your insight on the LocatorFieldValues. I am still having an issue with this however, I was wondering if you could post the code that you are using? Here is the experimental code that I am using, using the sample locator from the download. The geolocator works in the REST and ArcMap so I know it is a working locator. Thanks again!
DisplayText: "Search Address",
DefaultValue: "139 W Porter Ave, City of Naperville", // Set default address to search.
LocatorParamaters: ["SingleLine"], // Set Locator fields (fields to be used for searching).
LocatorURL: "http://MyServer/arcgis/rest/services/Sample_CompositeLocator/GeocodeServer",
CandidateFields: "Loc_name, Score, Match_addr",
DisplayField: "${Match_addr}",
AddressMatchScore: 80,
LocatorFieldName: 'Loc_name',
LocatorFieldValues: ["SiteAddress", "DualRange"]
... View more
12-11-2013
04:38 AM
|
0
|
0
|
344
|
POST
|
No solution yet, but I am hoping that the next releases of these apps will allow for greater customization (especially for the geolocators).
... View more
11-26-2013
06:48 AM
|
0
|
0
|
344
|
POST
|
I'd like to set my own geocoder for the My Government Services App (v10.2). As I understand this is possible, as the configuration is there now in 10.2. This is the standard code that the app comes with:
Locators: [{
DisplayText: "Search Address",
DefaultValue: "ADDRESS", // Set default address to search.
LocatorParamaters: ["SingleLine"], // Set Locator fields (fields to be used for searching).
LocatorURL: "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer",
CandidateFields: "Loc_name, Score, Match_addr",
DisplayField: "${Match_addr}",
AddressMatchScore: 80,
LocatorFieldName: 'Loc_name',
LocatorFieldValues: ["USA.StreetName", "USA.PointAddress", "USA.StreetAddress"]
}]
I was thinking that I could just input my own locator service, and update the LocatorFieldValues so that it references the fields on my locator and be done, like this:
Locators: [{
DisplayText: "Search Address",
DefaultValue: "ADDRESS", // Set default address to search.
LocatorParamaters: ["SingleLine"], // Set Locator fields (fields to be used for searching).
LocatorURL: "http://MyServer/arcgis/rest/services/Whatever/GeocodeServer", //My locator
CandidateFields: "Loc_name, Score, Match_addr",
DisplayField: "${Match_addr}",
AddressMatchScore: 80,
LocatorFieldName: 'Loc_name',
LocatorFieldValues: ["StreetName", "HouseNumber", "StreetAddress"] //References my locator
}]
But it doesnt work...any suggestions?
... View more
09-18-2013
11:50 AM
|
0
|
6
|
2338
|
POST
|
Same here, feature pack for sql server 2008 service pack 3 specifically. 32 or 64bit.
... View more
09-13-2013
07:48 AM
|
0
|
0
|
462
|
POST
|
This isn't a super serious issue, but I have found that when generating 5160 labels over one page, that the second and following pages sizes the font to 9 whereas the first page is size 8. I opened the code for the avery label and noticed that for the 5160 labels it specifies font size 9 once, but everwhere else in the code it specifies to use size 8. I changed the 9 to an 8, republished the service and it was good to go. Here is the final result for the Avery generation python: from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import letter
from reportlab.lib.units import inch
import arcpy,os
import textwrap
outfile = arcpy.GetParameterAsText(2).replace("\\",os.sep) #Get the path of the output File
out_pdf = canvas.Canvas(outfile, pagesize = letter)#set the size as letter
out_pdf.setFont("Helvetica", 8)#set the font as Helvetica & size as 8
arcpy.AddMessage("Starting...")#shows the message on the dialog box
arcpy.AddMessage(outfile)#shows the name of the pdf file on the dialog box
Label_name=arcpy.GetParameter(0) #Get the type of the label
arcpy.AddMessage(Label_name)
addressInput = arcpy.GetParameterAsText(1) #Get the address or some text
arcpy.AddMessage(addressInput)
#Logic for averyLabel 5160
def avery5160():
addressItem = addressInput.split('$')
hs = 0.25 # Left side of labels
vs = 10.4
horizontal_start = hs * inch # staring point of label horizontally
vertical_start = vs * inch #starting point of label vertically
count = 0 #initially the count is 0
for item in addressItem:
if count > 0 and count % 30 == 0:
out_pdf.showPage()
out_pdf.setFont("Helvetica", 8)
horizontal_start = hs * inch
vertical_start = vs * inch
elif count > 0 and count % 10 == 0:
horizontal_start = horizontal_start + 2.875 *inch # Left side of text in 2nd and 3rd columns of labels
vertical_start = vs * inch
label = out_pdf.beginText()
label.setTextOrigin(horizontal_start, vertical_start)
details = item.split('~')
for detail in details:
if len(detail) > 45:
name = detail[0:44]
label.textLine(name)
name = detail[44:60]
label.textLine(name)
else:
label.textLine(detail)
out_pdf.drawText(label)
vertical_start = vertical_start - 1.05 * inch
count = count + 1
out_pdf.showPage()
out_pdf.save()
#Logic for averyLabel 5193
def avery5193():
addressItem = addressInput.split('$')
horizontal_start = 0.44 * inch #staring point of label horizontally
vertical_start =10.45 * inch #starting point of label vertically
count = 0 #initially the count is 0
for item in addressItem:
if count > 0 and count % 24 == 0:
out_pdf.showPage()
out_pdf.setFont("Helvetica", 8)
horizontal_start = 0.44 * inch
vertical_start = 10.45 * inch
elif count > 0 and count % 6 == 0:
horizontal_start = horizontal_start + 2.00 *inch
vertical_start =10.45 * inch
print item
label = out_pdf.beginText()
label.setTextOrigin(horizontal_start, vertical_start)
details = item.split('~')
for detail in details:
if len(detail) > 25:
name = detail[0:24]
label.textLine(name)
name = detail[24:45]
label.textLine(name)
else:
label.textLine(detail)
out_pdf.drawText(label)
vertical_start = vertical_start - 1.7 * inch
count = count + 1
out_pdf.showPage()
out_pdf.save()
#Calling of either one of the Label
if (Label_name=="avery5160"):
avery5160()
elif (Label_name=="avery5193"):
avery5193()
... View more
09-09-2013
11:24 AM
|
0
|
1
|
2242
|
POST
|
FYI: I also had a machine upgraded from 10.1sp1 to 10.2, and would not publish any services regardless of security settings. I uninstallled, and reinstalled 10.2, viola fixed. Publishes services as it should again!
... View more
08-28-2013
11:24 AM
|
0
|
0
|
696
|
POST
|
Same here, regardless of geocoder (esri or mine) no results are found.
... View more
07-31-2013
10:10 AM
|
0
|
0
|
434
|
POST
|
Thanks everyone for following up on this. I was also able to fix this by changing some of the alignment as stated above.
... View more
07-31-2013
10:05 AM
|
0
|
0
|
1007
|
POST
|
Hi, I've been working on the Public Notification app for 10.1. Everything is working, but when the 5160 label is generated, and printed on a 5160 Avery sheet, the labels dont line up. The first few rows of each sheet are ok, but by the bottom of each page the labels are very far off. Any suggestions? Check out the attachment, this is a label creation from the app. Thank you!
... View more
06-20-2013
12:52 PM
|
0
|
7
|
4520
|
POST
|
We've got a similar situation here, one of the analysts cannot run Raster Calc in Model Builder. The model is fine, it runs on any other machine. We uninstalled reinstalled 10.1 to see if that helped, with no change. We are going to try a different user on the same machine (corrupted profile) or a re-image of the computer to see if that fixes it. I will update once we do this...
... View more
05-10-2013
11:36 AM
|
0
|
0
|
445
|
POST
|
You'll still have to download the MXD's and other files here: http://www.arcgis.com/home/item.html?id=7b4f3974b2c24d339dc0d527366ec1eb This is also useful, as the caching schema is only in this now: http://www.arcgis.com/home/item.html?id=1118010522f14f5294bc88c1445efc09
... View more
04-18-2013
01:33 PM
|
0
|
0
|
171
|
POST
|
That was it, thank you! (One of the layers wasn't set back to IO during an automated update)
... View more
09-23-2011
12:53 PM
|
0
|
0
|
2400
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|