POST
|
Hello Thank you to everyone who replied. Ideally I would have liked to continue to use the Coordinate Menu Widget as it had all the functionality I wanted, but as it does not go beyond version 3.3 this was not a viable option. I have instead used the Enhanced Locate widget and disabled the extra views to just leave the zoom to xy screen. This works great. In terms of getting the xy coordinates in the first place my users will have to get used to hovering the mouse over the point they want and noting down the coordinates that appear in the bottom left of the screen. Thanks again for all the replies Emma
... View more
02-04-2014
02:05 AM
|
0
|
0
|
810
|
POST
|
Hello I need to be able to enter coordinates and zoom to them using the flex viewer. I have no development software to compile flex code so need to use a compiled widget. In the past I have used the Coordinate Menu widget - which was great and did exactly what I needed, plus was simple to use. Unfortunately having upgraded to Flex Viewer 3.6 the widget no longer works and has not been recompiled beyond version 3.3. I tried using the enhanced locate widget, but I cannot work out how to isolate just the coordinate tab functions. All the geocoding and address lookup stuff isn't needed and will just confuse my users. ESRI - why isn't a simple zoom to xy bundled as part of the flex viewer as standard? If anyone has any ideas or is able to suggest something that will work with the new flex viewer I would appreciate it. Thanks Emma
... View more
01-23-2014
01:07 AM
|
0
|
8
|
3850
|
POST
|
Hello I got the solution to my initial query - the following code will export each of my pages showing just one route and the meeting place for that particular route. [INDENT]import arcpy import os #Get parameter for input project location mxdName = arcpy.GetParameterAsText(0) #Get parameter for output location outPath = arcpy.GetParameterAsText(1)+"\\" finalPdf = arcpy.mapping.PDFDocumentCreate(outPath + "HealthWalks.pdf") #Specify the map document and the data frame mxd = arcpy.mapping.MapDocument(mxdName) df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] #Select the scale of the map mxd.activeView='PAGE_LAYOUT' df.scale = "15000" #Get data driven index layer and name field lyrName = mxd.dataDrivenPages.indexLayer lyrField = mxd.dataDrivenPages.pageNameField.name #Specify the meeting places within the mapping files pLayer = arcpy.mapping.ListLayers(mxd, lyrName)[0] pMLayer = arcpy.mapping.ListLayers(mxd, "Meeting Place")[0] #Refresh the pages to display the 15000 scale and the meeting points mxd.dataDrivenPages.refresh() for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1): mxd.dataDrivenPages.currentPageID = pageNum #Get the current page fldName = mxd.dataDrivenPages.pageRow.NAME #Get route name to be used in definition query fld2= mxd.dataDrivenPages.pageRow.Meeting_Point #Get the name of the meeting point for this route pLayer.definitionQuery = lyrField + " = '" + fldName + "'" #Display the current route (def. query) arcpy.AddMessage(fld2) pMLayer.definitionQuery= "Meeting_Point = '"+ fld2+"'" #Display the meeting point for the current route (def. query) arcpy.AddMessage(pLayer.definitionQuery) #Export each page to a temporary PDF and append to the final PDF tmpPdf = outPath + fldName + "_temp.pdf" if os.path.exists(tmpPdf): os.remove(tmpPdf) arcpy.mapping.ExportToPDF(mxd, tmpPdf) finalPdf.appendPages(tmpPdf) os.remove(tmpPdf) del tmpPdf del mxd, df, finalPdf[/INDENT] Hope this helps Emma
... View more
10-29-2013
07:42 AM
|
0
|
0
|
447
|
POST
|
Hello Thanks for the compiled code. For anyone who is interested I found the issues I have with mouse pointer visibility only occurred with existing applications that I upgraded through the flex builder app. If I create a new application and add the Coordinate menu in the tool works great. I found that a number of the custom widgets have a few issues/odd behaviour when used with an upgraded existing application but in a new application they work fine. As I only have a couple of applications I'm going to recreate them from scratch as this seems to fix all the issues I have. Emma
... View more
07-03-2013
04:55 AM
|
0
|
0
|
771
|
POST
|
Hi I followed your suggestion and built a new application to test with. The identify worked with the actual names as you stated in the instructions. It just doesn't work with any existing applications that I created in a previous version and upgraded. Luckily I only have a couple of existing applications so can create them afresh as this seems to get everything working correctly. Thanks for your help Emma
... View more
07-03-2013
04:42 AM
|
0
|
0
|
297
|
POST
|
The code you posted with the actual names in it does not work for me. I went through and changed the fields to these originally following your instructions and no data was returned. Yes I have the url to the mapserver and id tag correctly configured, including in the exclude layers. I can get the correct data if I have the url, id tag and fields using the alias name! Hence my confusion Emma
... View more
07-02-2013
07:57 AM
|
0
|
0
|
297
|
POST
|
Hello I have upgraded my Flexviewer/App Builder to version 3.3. I have then upgraded my identify widget to version 3.3.2. I've been making the changes detailed in the configuration instruction pdf and am struggling with using the actual field name in the field element as per the instructions [INDENT]The field element name is now the actual field name and NOT the alias name of the field as it was in all previous versions.[/INDENT] My map service layer has its fields defined as Fields: FID ( type: esriFieldTypeOID , alias: FID ) Shape ( type: esriFieldTypeGeometry , alias: Shape ) OBJECTID ( type: esriFieldTypeInteger , alias: OBJECT ID ) SHAPE_LENG ( type: esriFieldTypeDouble , alias: SHAPE_LENG ) SHAPE_AREA ( type: esriFieldTypeDouble , alias: SHAPE_AREA ) NAME_ ( type: esriFieldTypeString , alias: NAME , length: 50 ) MAIN_SWITC ( type: esriFieldTypeString , alias: MAIN NUMBER , length: 50 ) HYPERLINK ( type: esriFieldTypeString , alias: HYPERLINK , length: 100 ) In my identify xml I want to show data from the NAME_ and MAIN_SWITC fields If I specify the alias names (see below) I get data back <fields> <field name="NAME" alias="Name"/> <field name="MAIN NUMBER" alias="Main Number"/> </fields> If I follow the instructions and use the actual field name I get nothing. Are the instructions wrong, is this a bug or have I not updated the widget correctly. Thanks Emma
... View more
07-02-2013
07:30 AM
|
0
|
5
|
698
|
POST
|
Hello I'm only using the compiled widget for the flexbuilder. Although I updated the widget in Flexbuilder it seems it didn't fully update, so I did as suggested and simply copied and pasted the compiled widget folder to the flexviwers/widget folder. The tool now works although when I right click and the context menu appears my mouse pointer disappears. It comes back if you escape out of the context menu or click away from the menu (if you click away you have to guess that the mouse is off the menu somewhere as it isn't visible). Any ideas? Emma
... View more
07-02-2013
03:16 AM
|
0
|
0
|
771
|
POST
|
Has anyone got this working with Flexviewer 3.3? I've upgraded and Coordinate Menu 3.1 won't work with the new Flexviewer. Will a new version of the widget be available? Thanks Emma
... View more
07-01-2013
06:49 AM
|
0
|
0
|
771
|
POST
|
Hello Thanks for suggestion - I didn't know about the page def query. I've tried it and this seems fine for a 1-1 relationship between route and starting point, but mine is a 1-many set up. A starting point can have a number of routes attached to it. So I still think I need to put some extra code in my script that picks up the starting point name from a field in the routes dataset and uses it to populate a def query in the starting point dataset. Whilst I get the theory of what I need to do - its actually putting the correct bits of python together to achieve this that I'm stumped on. Thanks Emma
... View more
03-13-2013
02:08 AM
|
0
|
0
|
447
|
POST
|
Hello I'm trying to use a python script tool to generate a number of maps showing walking routes and their starting points. I've set up the data driven pages based on each of the walking routes, and have written a script that runs through each page and only displays the walking route in question. Then exports each map to a pdf. This works fine except that all the starting point information shows all the time. Each walking route record has the name of the starting point associated with it stored in a field. How can I script taking the value from the walking route field and use it to create a definition query in the starting point dataset? This definition query will need to be updated each time the script iterates through the data driven pages. The script I'm using is below - where and what do I need to add to get the starting point layer working at the same time? I hope this makes sense Thanks Emma [INDENT]import arcpy import os #Get parameter for input project location mxdName = arcpy.GetParameterAsText(0) #Get parameter for output location outPath = arcpy.GetParameterAsText(1)+"\\" finalPdf = arcpy.mapping.PDFDocumentCreate(outPath + "HealthWalks.pdf") #Specify the map document and the data frame mxd = arcpy.mapping.MapDocument(mxdName) df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] #Get data driven index layer and name field lyrName = mxd.dataDrivenPages.indexLayer lyrField = mxd.dataDrivenPages.pageNameField.name pLayer = arcpy.mapping.ListLayers(mxd, lyrName)[0] for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1): mxd.dataDrivenPages.currentPageID = pageNum fldName = mxd.dataDrivenPages.pageRow.NAME #Get field used in dynamic query pLayer.definitionQuery = lyrField + " = '" + fldName + "'" #Export each theme to a temporary PDF and append to the final PDF tmpPdf = outPath + fldName + "_temp.pdf" if os.path.exists(tmpPdf): os.remove(tmpPdf) arcpy.mapping.ExportToPDF(mxd, tmpPdf) finalPdf.appendPages(tmpPdf) os.remove(tmpPdf) del tmpPdf del mxd, df, finalPdf[/INDENT]
... View more
03-05-2013
04:30 AM
|
0
|
5
|
1141
|
POST
|
I'm using the Flex Viewer application builder Draw Tool - I've not added a custom widget to the application builder, just using the 'out of the box' one. According to the tag reference info on the resources centre the geometry service is picked up from the main config.xml file and the wkid is not needed to be specified. Emma
... View more
10-30-2012
04:11 AM
|
0
|
0
|
195
|
POST
|
Hello I added the standard Draw & Measure tool to a Flex Viewer application - all worked fine. I then added the Coordinate Menu widget to the site so that I had copy and go to XY options in the context menu when I right clicked on the map. To get the Coordinate Menu tool to work I started the in built Geometry Service and pointed the site and the config.xml to this geometry service. The Coordinate Menu works fine, the corrdinates in the bottom of my screen work fine, however the Draw tool errors when the Show Measurements option is ticked. The error message is: [FaultEvent fault=[RPC Fault faultString="Error executing project" faultCode="500" faultDetail=""] messageId=null type="fault" bubbles=false cancelable=true eventPhase=2] Have I missed something - I'm using ArcGIS Server 10.1. Any ideas would be much appreciated as I'm completely stumped by this Thanks Emma
... View more
10-26-2012
05:21 AM
|
0
|
3
|
2327
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|