POST
|
Why is this NOT in the Javascript API Samples? Isn't a Select by Attribute tool such a basic task, e.g. search a road name, search an id, search a city name. I took a stab at it and got this to sortof work. Problem is that the result set has to be > 1 in order for the zoom to selected to work. http://forums.arcgis.com/threads/77925-QueryTask-and-Zoom-to-Result?p=321366&posted=1#post321366 Will
... View more
08-15-2013
07:51 AM
|
0
|
0
|
3067
|
POST
|
Why does this only zoom to selected features when the result is > 1? If you enter a city such as Miami which returns multiple points it works, but Raleigh doesn't zoom to the selection because the result set is 1. i use the sandbox to test the javascript - https://developers.arcgis.com/en/javascript//sandbox/sandbox.html?sample= <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="X-UA-Compatible" content="IE=7" /> <title>QueryTask with value, results as an InfoWindow</title> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/1.6/js/dojo/dijit/themes/tundra/tundra.css"> <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=1.6"></script> <script type="text/javascript" language="Javascript"> dojo.require("esri.map"); dojo.require("esri.tasks.query"); var map, queryTask, query; var symbol, infoTemplate; function init() { //create map map = new esri.Map("mapDiv"); //create and add new layer var layer = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer"); map.addLayer(layer); //build query task queryTask = new esri.tasks.QueryTask("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/0"); //build query filter query = new esri.tasks.Query(); query.returnGeometry = true; query.outFields = ["CITY_NAME", "STATE_NAME", "POP1990"]; //create the infoTemplate to be used in an InfoWindow. //All ${attributeName} will be substituted with the attribute value for current feature. infoTemplate = new esri.InfoTemplate("${CITY_NAME}", "Name : ${CITY_NAME}<br/> State : ${STATE_NAME}<br />Population : ${POP1990}"); //create symbol for selected features symbol = new esri.symbol.SimpleMarkerSymbol(); symbol.setStyle(esri.symbol.SimpleMarkerSymbol.STYLE_SQUARE); symbol.setSize(10); symbol.setColor(new dojo.Color([255,255,0,0.5])); } function executeQueryTask(population) { //set query based on what user typed in for population; query.where = "CITY_NAME = " + "'" + population +"'"; //execute query and call showResults on completion queryTask.execute(query,showResults); } function showResults(featureSet) { //remove all graphics on the maps graphics layer map.graphics.clear(); //QueryTask returns a featureSet. Loop through features in the featureSet and add them to the map. //Performance enhancer - assign featureSet array to a single variable. var resultFeatures = featureSet.features; for (var i=0, il=resultFeatures.length; i<il; i++) { //Get the current feature from the featureSet. //Feature is a graphic var graphic = resultFeatures; graphic.setSymbol(symbol); //Set the infoTemplate. graphic.setInfoTemplate(infoTemplate); //Add graphic to the map graphics layer. map.graphics.add(graphic); var myFeatureExtent = esri.graphicsExtent(resultFeatures); map.setExtent(myFeatureExtent.expand(2.5)); } } dojo.addOnLoad(init); </script> </head> <body class="tundra"> <br/> US city population greater than : <input type="text" id="population" value="Raleigh" /> <input type="button" value="Get Details" onclick="executeQueryTask(dojo.byId('population').value);" /> <div id="mapDiv" style="width:600px; height:600px; border:1px solid #000;"></div> Click on a city once it's highlighted to get an InfoWindow. </body> </html>
... View more
08-15-2013
07:37 AM
|
0
|
0
|
1015
|
POST
|
ok, but how can this code be modified to zoom to the selected feature? I would like to be able to perform a select by attribute on a feature class and zoom to the result on the map.
... View more
08-15-2013
05:09 AM
|
0
|
0
|
437
|
POST
|
Robert, One more questions regarding label rotation. I added labelRotation="45" to the <mx:horizontalAxisRenderers> tag and then compiled, however the labels are not rotated. What am I missing? Thanks. Will <mx:ColumnChart id="columnChart"left="1" right="1" top="1" bottom="1"dataTipFunction="columnSeriesDataTipFunction"showDataTips="true"> <mx:series> <mx:ColumnSeries id="columnSeries" yField="value"/> </mx:series> <mx:horizontalAxis> <mx:CategoryAxis id="columnAxis" categoryField="name"/> </mx:horizontalAxis> <mx:horizontalAxisRenderers> <mx:AxisRenderer axis="{columnAxis}" showLabels="true" labelRotation="45"/> </mx:horizontalAxisRenderers> </mx:ColumnChart>
... View more
11-29-2012
07:45 PM
|
0
|
0
|
214
|
POST
|
What is the correct way to modify the PopUpMediaBrowserSkin.mxml file? I have already modified the PopUpRendererSkin.mxml file using Robert's instructions in another post. Created package called com.esri.ags.skin , and then copied the PopUpRendererSkin.mxml file from the 3.0 API (arcgis_api_for_flex_3_0\ArcGIS_Flex\skins\src\com\esri\ags\skins), and pasted into the new package (ags.skins). Is the process the same for adding and modifying the PopUpMediaBrowserSkin.mxml? The only difference I see is that PopUpMediaBrowserSkin.mxml is located in the supportClasses folder inside the API download. Can I place the PopUpMediaBrowserSkin.mxml file in the same package where I put PopUpRendererSkin.mxml? Thanks. Will
... View more
11-26-2012
07:06 PM
|
0
|
0
|
728
|
POST
|
the zoom scale doesn't work. when selecting a feature in the query widget it zooms to the lowest zoom level.
... View more
11-07-2012
12:58 PM
|
0
|
5
|
595
|
POST
|
Can you try with: version="1.1.1" Well how about that. It works now that I changed the version to 1.1.1. Thanks. It is intersting however that I cannot see the wms in the FV until after I open the wms URL in my browser, which prompts me for my certificate. Is there a way for the FV to prompt for secured services which require a certificate? Will
... View more
10-30-2012
05:29 PM
|
0
|
0
|
377
|
POST
|
Try changing the URL to: https://somedomain.com/services/WMS and remove the version="1.3.0" Same result after removing the version and changing the URL. -Will
... View more
10-29-2012
10:25 PM
|
0
|
0
|
377
|
POST
|
My operational layer (wms wkid=4326) doesn't overlay correctly with the basemap below which is also in WGS84 (wkid=4326). See attached screenshot. <map wraparound180="true" initialextent="126.987 37.066 127.060 37.098" fullextent="-179 -89 179 89" top="40"> Basemap: <basemaps> <layer label="Streets" type="tiled" visible="true" url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer"/> </basemaps> operational layer is: <layer label="Weather" type="wms" visible="true" visiblelayers="LAND,BOUNDARIES,Present_Wx" FORMAT="image/png" alpha="0.8" styles="default" url="https://somedomain.com/services/WMS?CRS=EPSG:4326" skipgetcapabilities="true" version="1.3.0" /> Any ideas? I am using the 3.0 FV. Thanks. Will
... View more
10-29-2012
05:44 PM
|
0
|
5
|
827
|
POST
|
Has anyone out there figured out how to insert secured wms (AFW-WEBS) into the flexviewer? I can see the wms services from within ArcCatalog, however, the services don't display in the flexviewer. I am pretty sure this is due the wms security since a certificate is required in order to view the services. Initially on load of my flexviewer (on my server) there is a prompt for certificate, however, the flexviewer doesn't prompt for a certificate on loading the secure wms. Is there a way to force trigger prompt for certificate when reading in the secure wms?
... View more
10-24-2012
05:58 PM
|
0
|
0
|
630
|
POST
|
problem solved .... sort of. There is some conflict when the feature class has a cartographic representation. Once I deleted the cartographic representation I was able to post to Default version and edit the fc in Default connected as SDE. ESRI!!!!! Why? Now I am invested in cartographic representations for some of my feature classes but now they don't support versioning. I can register them as versioned but I cannot post to default. The strange thing is that I CAN edit them and post from a child to a parent version, but edits won't post to Default. So now I have to unregister my fc as versioned make a copy of the fc to a personal geodatabase, and then load the fc back into SDE. And I have to re-register it as versioned because it exists within a dataset with other fc that are versioned. sorry, but this workflow really sucks. -WH
... View more
04-30-2012
09:07 PM
|
0
|
0
|
309
|
POST
|
I forgot to mention in the original post that PKI is enabled as well as SSL. Thanks. It looks like the default behavior of the flex viewer doesn't recognize when a wms is PKI enabled because it doesn't ask for my certificate when I load the viewer. -Will
... View more
03-11-2012
03:18 AM
|
0
|
0
|
630
|
POST
|
Thanks Anthony for the quick response and modification the Coordinate widget. Great tool. -Will
... View more
03-10-2012
10:16 PM
|
0
|
0
|
651
|
POST
|
Ok, now this is getting worse off than I expected. Now I cannot reconcile edits in the Edit versions with the parent (QC) version. Error: The version could not be reconciled. Underlying DBMS error[ORA-00001: unique constraint (Geo.A1452_PK) violated][Geo.utility_meter]. The only difference this week is that we have multiple editors editing the same fc - utility_meters. Any ideas? Recently I added Cartographic Represntations to our utility lines feature class, and now I cannot post edits to the SDE.Default version. I am getting this error isn the sde_arcsde_x.log file: Error: Unable to save to base state 0->15623445 for table geo.utility_line, error = 1403 I can post attribute edits but any geometry edits fail to post to default. I originally created the cartographic representations connected as the GEO user in the GEO.QC version. Anyone know why I cannot post geometry edits to the default version? I can post all edits from an edit version up to the QC version, but not to Default. During our last maintenance cycle I had to unregister my utility lines as versioned, copy to a pgdb, and then load the data back into SDE. I thought that might solve the problem but it did not. Thanks. -Will ArcSDE 9.3.1 ArcGIS 9.3.1 Oracle 10g Windows Server 2003 R2 ST_Geometry Versioned Database: SDE.Default GEO.QC Editor.Editor Workflow - make edits in Editor version then post to QC, then post from QC to Default
... View more
03-07-2012
11:50 PM
|
0
|
0
|
309
|
POST
|
Anthony, I am getting an Error Code #2036 in the MapManager popup. I am using FV2.5. BTW - The Coordinate Widget and CoordinateMenu Widgets are awesome. I don't fully understand how they can be configured but I've been looking for this functionality for a while so great work. I did notice that the MGRS longitudinal labels are cut off at the bottom of my map. Can the placement be configured?[ATTACH=CONFIG]12505[/ATTACH] It appears that the grey footer banner is covering up the labels. How can I make the MGRS grid be turned on by default? Thanks. -Will Marc, I have looked at it on my system and the right click copy MGRS is working as it should. Just in case we have had a mix up of files along the way somewhere I have attached a zip file containing the 3 widgets (coordinate, coordinatemenu & MGRS) that are all working on my system. Regards Anthony
... View more
03-07-2012
06:58 PM
|
0
|
0
|
943
|
Title | Kudos | Posted |
---|---|---|
1 | 06-03-2016 10:20 PM | |
1 | 12-30-2015 07:08 AM | |
1 | 08-15-2014 04:39 PM | |
4 | 11-15-2018 12:30 PM | |
1 | 12-29-2015 08:04 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|