POST
|
Hi All, Thank you for your time in advance. I am wondering if anyone could provide valuable opinions how to display the text from a Double field in the info window (code listed below). I found some records have the zero value in the Double field ${WellDepth}. I want to see if anyone could provide a function to replace the 0 to display "Unknown Value" and keep the same value if the ${WellDepth} is greater than 0. Many thanks, Hank var content_magnesium_depthLocation =
"<b>PointID</b>: ${POINT_ID}" +
"<br><b>Date Collection</b>: ${Collection}" +
"<br><b>Magnesium Value</b>: ${Mg_Symbol}${Mg}(mg/L)" +
"<br><b>Well Depth</b>: ${WellDepth}(ft)" +
"<br><b>Data Source</b>: ${DataSource}" +
"<br><b>Data Source Information</b>: ${DataSour_1}" +
"<br><b >More Information</b>:<a target='_blank' href='https://community.esri.com/maps/data/Water/${POINT_ID}/Mg' >Magnesium Info</a>";
... View more
05-16-2016
11:01 AM
|
0
|
3
|
2184
|
POST
|
Hi Robert, I tried to use the styled.html as my template and replaced the "url" with the TDS data url. It is working! However, in the default.html, I still see the number and error (the attached file, syntax error). I am not sure if the error could provide the helpful information. Thanks, Hank
... View more
04-18-2016
01:12 PM
|
0
|
1
|
1130
|
POST
|
Hi Robert, Thank you for the reply. I put the "src" folder in the same location as the html file. Thanks, Hank
... View more
04-18-2016
12:42 PM
|
0
|
2
|
1130
|
POST
|
Hi Robert, Thank you for the reply. I followed your instructions (set the proxy url to my machines proxy). However, I still saw the number on the screen. Thanks, Hank
... View more
04-18-2016
10:37 AM
|
0
|
1
|
1130
|
POST
|
Hi All, I tried to modified the ESRI/cluster-layer-js created by Allan Laframboise. Basically, I replaced the data url to my data url ("http://129.138.12.30:6080/arcgis/rest/services/Water/HCO3_All/FeatureServer/0") in "url" in the default.html. Then I also update two parameters such as "returnLimit" : 10000 and "maxSingles": 10000 in the default.html. However, I can only see the number on the screen (the attached file, number on the screen). In addition, the other attached file (REST INFO) shows the data info on the rest server. Could anyone show your valuable opinions on this issue? Thanks, Hank <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=7,IE=9"> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> <title>Default Cluster Layer</title> <link rel="shortcut icon" href="https://community.esri.com//esri.github.io/quickstart-map-js/images/favicon.ico"> <!-- ArcGIS API for JavaScript CSS--> <link rel="stylesheet" href="https://js.arcgis.com/3.15/esri/css/esri.css"> <script type="text/javascript"> window.dojoConfig = { async: true, packages: [ { name: 'app', location: window.location.pathname.substring(0, window.location.pathname.lastIndexOf('/')) + '/src' } ]}; </script> <!-- ArcGIS API for JavaScript library references --> <script src="https://js.arcgis.com/3.15compact"></script> <script> require(["esri/map", "esri/dijit/Geocoder", "esri/dijit/HomeButton", "esri/InfoTemplate", "esri/graphic", "app/clusterfeaturelayer", "dojo/domReady!"], function (Map, Geocoder, HomeButton, InfoTemplate, Graphic, ClusterFeatureLayer) { // esriConfig.defaults.io.proxyUrl = "http://maps.nmt.edu/DotNet/proxy.ashx"; // esriConfig.defaults.io.alwaysUseProxy = false; // Locals var map, popup, clusterLayer, geocoder, infoTemplate, selectedSym; // Create map map = new Map("mapDiv", { basemap: "dark-gray", center: [-43, 40], zoom: 3 }); // Add clusters map.on("load", function () { // Add layer addClusterLayer(); addClusterLayerEvents(); }); // Save the last selected graphic map.infoWindow.on("selection-change", function () { addSelectedFeature(); }); // Create widget geocoder = new Geocoder({ value: "Washington, D. C., District of Columbia, United States", autoNavigate: true, maxLocations: 25, autoComplete: true, arcgisGeocoder: { outFields: "Place_addr, PlaceName, Score" }, map: map }, "search"); geocoder.startup(); var home = new HomeButton({ map: map }, "homeButton"); home.startup(); // Set popup popup = map.infoWindow; popup.highlight = false; popup.titleInBody = false; popup.domNode.className += " light"; // Popup content infoTemplate = new InfoTemplate("<b>City Data</b>", "<p>NAME: ${CITY_NAME}</p><p>COUNTRY: ${CNTRY_NAME}</p><p>CAPITAL: ${ADMIN_NAME}</p><p>POPULATION: ${POP}</p>"); // Create a feature layer to get feature service function addClusterLayer() { clusterLayer = new ClusterFeatureLayer({ "url": "http://129.138.12.30:6080/arcgis/rest/services/Water/HCO3_All/FeatureServer/0", "distance": 50, "id": "clusters", "labelColor": "#fff", "resolution": map.extent.getWidth() / map.width, "singleTemplate": infoTemplate, "useDefaultSymbol": false, "zoomOnClick": true, "returnLimit" : 10000, "showSingles": true, "maxSingles": 10000, "objectIdField": "OBJECTID", // "spatialReference":4269, outFields: ["TDS", "LONG", "LAT", "DataSource"] }); map.addLayer(clusterLayer); } // Hide popup if selected feature is clustered function onClustersShown(clusters) { var i = 0, extent; if (map.infoWindow.isShowing && map.infoWindow._lastSelected) { for (i; i < clusters.length; i++) { if (clusters.attributes.clusterCount > 1) { extent = clusterLayer._getClusterExtent(clusters); if (extent.contains(map.infoWindow._lastSelected.geometry)) { map.infoWindow.hide(); break; } } } } } // Wire cluster layer events function addClusterLayerEvents() { // Clusters drawn clusterLayer.on("clusters-shown", onClustersShown); } // Set selected function addSelectedFeature() { var selIndex = map.infoWindow.selectedIndex, selFeature; if (selIndex !== -1) { selFeature = map.infoWindow.features[selIndex]; // Remove old feature first removeSelectedFeature(); // Add new graphic map.infoWindow._lastSelected = new Graphic(selFeature.toJson()); map.infoWindow._lastSelected.setSymbol(selectedSym); map.graphics.add(map.infoWindow._lastSelected); } } // Remove selected function removeSelectedFeature() { if (map.infoWindow._lastSelected) { map.graphics.remove(map.infoWindow._lastSelected); map.infoWindow._lastSelected = null; } } }); </script> </head> <body> <div id="mapDiv"></div> <div id="search"></div> <div id="homeButton"></div> </body> </html>
... View more
04-18-2016
09:29 AM
|
0
|
8
|
3241
|
POST
|
There is no table existed with the field "Geometry". There are some feature class tables with "Geometry" living in another database.
... View more
04-12-2016
08:10 AM
|
0
|
1
|
1316
|
POST
|
The master view (not the table) created in the MSSQL only contains x & y coordinates stored in two separate fields. Thanks, Hank
... View more
04-12-2016
07:57 AM
|
0
|
2
|
1316
|
POST
|
Hi Tanu, Thank you for the quick updating. In the master view created in MSSQL server, there is no field "Geometry". Therefore, I need to use the "Display X, Y Data" to create the feature class. I am wondering if you would recommend to put the field "Geometry" into the master view. Then I add the "Geometry" in my complex query. Otherwise, could you recommend any better idea? Thanks, Hank
... View more
04-11-2016
09:14 AM
|
0
|
2
|
1316
|
POST
|
The Query layer is working smoothly with the complex query. Now, I do not need to export to csv file by python. Instead, I used the Query Layer to export to the MSSQL as the database feature class. Then I can publish these data. Thanks, Hank
... View more
04-11-2016
08:48 AM
|
0
|
4
|
1316
|
POST
|
Hi all, Thank you for your time in advance. I am wondering if any tool or layer in the ArcGIS could work with the SQL query directly. In my previous post, Mody Buchbinder mentioned the MakeQueryTable might work with the complex query listed below. However, it did not work. Now, I was told that the Query layer might work with the complex query. Or you would suggest to execute the complex query in the MSSQL server to get the data and export the data to ArcMap. Let me know your valuable opinions. Thanks, Hank SELECT t.POINT_ID, t.CollectionDate, t.HistoricDate, t.U, t.LAT, t.LONG, t.WellDepth, t.DataSource FROM (SELECT POINT_ID, MAX(CollectionDate) AS MaxValue FROM NM_Water_Quality.dbo.MASTER_UNION_Water_Quality WHERE (U IS NOT NULL) AND (U > 0) GROUP BY POINT_ID) AS x INNER JOIN NM_Water_Quality.dbo.MASTER_UNION_Water_Quality AS t ON x.POINT_ID = t.POINT_ID AND x.MaxValue = t.CollectionDate WHERE (t.U IS NOT NULL) AND (t.U > 0)
... View more
04-08-2016
09:25 AM
|
1
|
11
|
4517
|
POST
|
Hi Bill, HooRay!! I wish I could talk to you in the future if I have the questions. Many Thanks, Hank
... View more
03-24-2016
10:25 AM
|
0
|
0
|
684
|
POST
|
Hi Steve, Thank you for the valuable opinions. I will follow your instructions to make the codes. I am also wondering if you have found any sample; Therefore, I could follow the codes in the sample. Many thanks, Hank
... View more
03-23-2016
03:16 PM
|
0
|
4
|
684
|
POST
|
Hi Mody, Thank you for the information. I am wondering if you know query layer could work with the complex query I mentioned in the post. Thanks, Hank
... View more
03-23-2016
03:05 PM
|
0
|
0
|
703
|
POST
|
Hi all, Thank you for your time in advance. I am wondering if I could create a slider to adjust the value in the column "WellDepth" (Please see the attached file) and control the display of point features. I found there is a time slider widget to work on the time-enabled layers. However, I am not sure if it is possible to have a slider to control the display of points by the WellDepth. Could anyone share your valuable opinions? Thanks, Hank
... View more
03-23-2016
02:33 PM
|
0
|
7
|
1915
|
Title | Kudos | Posted |
---|---|---|
1 | 08-07-2015 09:37 AM | |
1 | 04-08-2016 09:25 AM | |
1 | 12-11-2015 07:38 AM | |
1 | 10-14-2013 08:14 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|