POST
|
I'm attempting to modify the widths of 4 columns displayed in a data container/table which I customized from the Tax Parcel Viewer (Tax Parcel Viewer | ArcGIS for Local Government ). Out of the box, the template had 2 columns displayed and I've added 2 additional columns. Now I cannot get the headers and results to line up with one another. I've attempted to modify the header and field and widths in locator.js. However, no matter what I input, field width seems to be overridden (CSS perhaps?). The actual column widths seem to be more driven by the table contents rather than the specified width. As you can see in the images, the field widths are different. Header code: var tableHeader = document.createElement("table");
tableHeader.className = "tblSearchHeader";
var tbodyHeader = document.createElement("tbody");
tableHeader.appendChild(tbodyHeader);
var trHeader = document.createElement("tr");
tbodyHeader.appendChild(trHeader);
trHeader.className = "trAddressGray";
var tdParcelId = document.createElement("td");
trHeader.appendChild(tdParcelId);
tdParcelId.style.width = "47px";
tdParcelId.innerHTML = "Record";
var spanUp = document.createElement("span");
spanUp.innerHTML = "▲";
spanUp.id = "spanUp";
spanUp.style.marginLeft = "5px";
tdParcelId.appendChild(spanUp);
var tdTaxMap = document.createElement("td");
tdTaxMap.innerHTML = "Tax Map";
tdTaxMap.style.width = "70px"
trHeader.appendChild(tdTaxMap);
var spanUpTaxMap = document.createElement("span");
spanUpTaxMap.innerHTML = "▲";
spanUpTaxMap.id = "spanTaxMap";
spanUpTaxMap.style.marginLeft = "5px";
tdTaxMap.appendChild(spanUpTaxMap);
var tdAddress = document.createElement("td");
tdAddress.innerHTML = "Location";
tdAddress.style.width = "70px"
trHeader.appendChild(tdAddress);
var spanUpAdd = document.createElement("span");
spanUpAdd.innerHTML = "▲";
spanUpAdd.id = "spanUpAdd";
spanUpAdd.style.marginLeft = "5px";
tdAddress.appendChild(spanUpAdd);
var tdOwnerId = document.createElement("td");
tdOwnerId.innerHTML = "Owner";
tdAddress.style.width = "20%"
trHeader.appendChild(tdOwnerId);
var spanUpOwn = document.createElement("span");
spanUpOwn.innerHTML = "▲";
spanUpOwn.id = "spanUpOwn";
spanUpOwn.style.marginLeft = "5px";
tdOwnerId.appendChild(spanUpOwn); Field/Attribute Code: var parcelID = attributes[displayFields[0]];
td.innerHTML = parcelID;
td.style.width = "61px";
var td1 = document.createElement("td");
var taxMapNo = attributes[displayFields[1]];
td1.innerHTML = taxMapNo;
td1.style.width = "70px";
var td2 = document.createElement("td");
var parcelLoc = attributes[displayFields[2]];
td2.innerHTML = parcelLoc;
td2.style.width = "85px";
var td3 = document.createElement("td");
var owner = attributes[displayFields[3]];
td3.innerHTML = owner;
//td3.style.width = "45px";
tr.setAttribute("addressValue", parcelLoc); Any assistance would be greatly appreciated!
... View more
07-28-2016
06:50 AM
|
0
|
2
|
1518
|
POST
|
This information is extremely helpful! Would you be willing to share your locator.js? I can't seem to get the placement of the code correct. Thanks!
... View more
07-26-2016
07:27 AM
|
0
|
0
|
328
|
POST
|
I just wanted to follow up in case others have a similar issue. The problem was, of course, a syntax error in either config.js or proxy.config. What I wound up doing was going to back to square one, and publishing this application using the sample data provided. Once that was up and running smoothly, I replaced the sample services with my services on by one, testing after each change. I also commented out sections of config.js which did not apply to our deployment (assessment operations for example). Now it's up and running and I'm on to customizing the template.
... View more
07-26-2016
07:18 AM
|
0
|
0
|
267
|
POST
|
I'm attempting to deploy the Tax Parcel Viewer template as a replacement for our County's parcel viewer. At this point, I've got the application up and "running" but the Locate tool doesn't seem to be working. When I enter a tax parcel id or address, I just get the progress bar and never get a result. Also, I can zoom and pan within the map, which works great, but I can't click on a parcel and get the Info Window to pop up. I am using a slightly different schema than provided by the LGIM, but I (thought) made all the necessary changes in the config.js file to accommodate the schema. I'm sure it's something simple, I just can't figure it out! Ideas?
... View more
07-18-2016
11:10 AM
|
0
|
1
|
1053
|
POST
|
I heard from ESRI and it is neither required nor recommended to install Desktop on the same machine as the web adaptor.
... View more
05-03-2016
11:06 AM
|
0
|
0
|
302
|
POST
|
Thanks. Do you think that installing desktop along with the web adaptor on the same machine is advisable or recommended? Is that a typical deployment?
... View more
04-28-2016
11:20 AM
|
0
|
1
|
302
|
POST
|
I'm implementing our ArcGIS for Server Site and have a question about whether or not is is advisable/recommended to install ArcGIS for Desktop on the same machine as the web adaptor? Thanks!
... View more
04-28-2016
10:35 AM
|
1
|
5
|
1969
|
POST
|
Each year, we bill our customers a rate based on the acreage they own on 12/31 of that year. Due to situations beyond my control, plats are recorded slowly, and record numbers (our unique ID) are not applied in a timely and consistent fashion. This year, we received plats stamped in 2016 prior to receiving all of the 2015 plats. I know the parcel fabric history tab can be used to "roll back" time to a point where parcels have no system end date (NULL), which seems to be the best way to produce a temporal snapshot. However, due to the uneven nature of how they are delivered, we can't rely on the system end date to provide that snapshot. Any ideas how to best handle this situation so we can take that snapshot annually?
... View more
03-16-2016
05:22 AM
|
0
|
0
|
2713
|
POST
|
I stumbled onto this thread as I am also attempting to overwrite an existing service on ArcGIS Server with python. The script provided by stackexchange still doesn't work for me. I'm getting the following errors: Traceback (most recent call last): File "C:\scripts\PubStackExchange.py", line 35, in <module> con, True, None, summary, tags) File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\utils.py", line 18 1, in fn_ return fn(*args, **kw) File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\mapping.py", line 382, in CreateMapSDDraft return convertArcObjectToPythonObject(arcgisscripting._createMapSDDraft(*gp_ fixargs([map_document, out_sddraft, service_name, server_type, connection_file_p ath, copy_data_to_server, folder_name, summary, tags], True, False))) IOError: Missing raster band wavelength properties. Any ideas?Python
... View more
12-31-2015
07:43 AM
|
0
|
0
|
2154
|
POST
|
I appreciate your take on accepting the error, and would be fine with that myself. However, a local home builder pointed out this discrepancy to us and come to find out, an entire subdivision is affected. According to him, there is a perception of lifestyle and safety associated with one zip code vs. the other. I hate to tell him, but the house is still in the same place
... View more
12-17-2015
08:52 AM
|
0
|
1
|
945
|
POST
|
I did find two resources which provide the correct zip code. Unfortunately, neither are GIS data. https://tools.usps.com/go/ZipLookupAction!input.action?mode=1&refresh=true is a tool via USPS which allows you to check if a zip code is correct to a specific existing street address. Note that the USPS tool Every Door Direct Mail shows ZCTAs. Free ZIP Code Map - US DataMart shows the most accurate zip code boundaries (verified by a single local post-master). With these resources, we'll just modify our process flow for addressing to include a check of these two resources. We may also look into purchasing GIS data for zip codes if we can do so with a regional government collective and share the costs. However, it would be nice to visually display the census blocks which fall under this category so we can manually check fewer addresses with the resources listed above.
... View more
12-17-2015
08:49 AM
|
0
|
0
|
945
|
POST
|
I understand that ZCTA's and zip codes can be different in places. The ZCTAs represent zip code aggregations at the block level. Does anyone know if there is any way to determine which blocks had data points with more than 1 zip code?
... View more
12-17-2015
06:50 AM
|
0
|
6
|
4624
|
POST
|
No, I'm in an SDE environment with SQL Server 2008 R2 on the back end. I wondered about the storage format too. I'll change up the quotes and see if I can get anything to stick -- the obvious choice is to remove them completely, but that throws the syntax error. I'm wondering if the .replace function just isn't meant to function this way.
... View more
12-16-2015
08:32 AM
|
0
|
1
|
547
|
POST
|
Thanks for the reply. The code works fine in that it runs without errors, but for whatever reason it's keeping those quotes in the resulting definition query. Using the code I provided above, my expected result is: SHAPE.STLength() and I'm getting: 'SHAPE.STLength()' which is a syntax error in the definition query. I've tried swapping out double quotes/single quotes and the code will bring over either one that is used in the script. Removing the quotes altogether generates the following error: File "C:\temp\DefQueryScript\ReplaceStatement.py", line 25, in <moldule> 'shape_length' : SHAPE.STLength(), NameError: name 'SHAPE' is not defined. which is to be expected. If I go into the MXD and create the same definition query manually, no quotes are used. Is it possible there is a setting somewhere that allows DQs to run without the quotes or would put them back in?
... View more
12-16-2015
07:20 AM
|
0
|
3
|
547
|
POST
|
I've got a series of MXDs with definition queries with file gdb-specific syntax. I'd like to batch modify those DQs to work with enterprise gdb syntax. Not every layer has a DQ, and not all DQs are the same. The problem I'm running into is with the expressions portion... the function is passing 'SHAPE.STLength()' with the quotes to the definition query, which doesn't match the syntax (need it without the quotes). Changing them to double quotes returns similar results, and removing the quotes all together causes the function to fail. Any ideas? import arcpy from arcpy import env from os import path env.workspace = ws = r"C:\temp\DefQueryScript\test1" expressions = { 'shape_length' : 'SHAPE.STLength()', 'shape_area' : 'SHAPE.STArea()', 'SHAPE_Length' : 'SHAPE.STLength()', 'SHAPE_Area' : 'SHAPE.STArea()', 'SHAPE_length' : 'SHAPE.STLength()', 'SHAPE_area' : 'SHAPE.STArea()', } def letsGetThisPartyStarted(): ''' For each Map Document in the workspace, check each layer for a definition query, and if found, update it according to the contents of the expression dictionary.''' print "Let's get this party started!\n" mxds = getMXDs() for i, mxd in enumerate(mxds): for layer in getLayers(mxd): evaluateExpression(layer) saveMXD(mxd, i) def getMXDs(): ''' Create a list of each Map Document in the workspace(s).''' mxds = [arcpy.mapping.MapDocument(m) for m in arcpy.ListFiles("*.mxd")] return mxds def getLayers(mxd): ''' Collects all feature layer in a Map Document.''' print "{0} layers:\n".format(mxd.filePath) layers = [l for l in arcpy.mapping.ListLayers(mxd) if l.isFeatureLayer] return layers def evaluateExpression(lyr): ''' If the layer has a Definition Query, update that query using the dictionary of expressions.''' if lyr.definitionQuery: for exp in expressions.items(): key, value = exp[0], exp[1] if key in lyr.definitionQuery: updateDefinitionQuery(lyr, key, value) else: print " {0}: No Definition Query found\n".format(lyr.name) pass def updateDefinitionQuery(lyr, old_exp, new_exp): ''' Replaces the old expression with the new one. Fill in the old/new associations in the "expressions" dictionary above.''' print " {0}:".format(lyr.name) print " Old expression: {0}".format(lyr.definitionQuery) lyr.definitionQuery = lyr.definitionQuery.replace(old_exp, new_exp) print " New expression: {0}\n".format(lyr.definitionQuery) def saveMXD(mxd, i): ''' Saves a copy of the Map Document which has had it's layers Definition Queries updated.''' mxd.saveACopy(path.join(ws, "COPY_" + mxd.filePath + "_{0}.mxd".format(i))) del mxd if __name__ == "__main__": letsGetThisPartyStarted() print "'fin.'"
... View more
12-16-2015
05:31 AM
|
0
|
5
|
3806
|
Title | Kudos | Posted |
---|---|---|
1 | 08-15-2016 01:13 PM | |
1 | 05-14-2015 12:21 PM | |
3 | 09-11-2019 10:51 AM | |
1 | 08-01-2019 09:58 AM | |
2 | 03-17-2017 01:39 PM |
Online Status |
Offline
|
Date Last Visited |
01-17-2024
09:39 PM
|