|
POST
|
Hi Rickey, This is my code: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Test Table</title> <script src="https://js.arcgis.com/3.16/"></script> <link rel="stylesheet" href="https://js.arcgis.com/3.16/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="https://js.arcgis.com/3.16/esri/css/esri.css"> <style> html, body, #map{ height: 100%; width:100%; margin:0; padding:0; } <!-- This is the Home Button --> #HomeButton { display: block; position: absolute; top: 90px; left: 20px; z-index: 2; } </style> <script> var map=''; require([ "esri/layers/FeatureLayer", "esri/dijit/FeatureTable", "esri/dijit/HomeButton", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/layers/ImageParameters", "esri/geometry/webMercatorUtils", "esri/map", "dojo/dom-construct", "dojo/dom", "dojo/parser", "dojo/ready", "dojo/on", "dojo/_base/lang", "dijit/registry", "dijit/form/Button", "dijit/layout/ContentPane", "dijit/layout/BorderContainer", "dijit/form/TextBox" ], function ( FeatureLayer, FeatureTable, HomeButton, ArcGISDynamicMapServiceLayer, ImageParameters, webMercatorUtils, Map, domConstruct, dom, parser, ready, on,lang, registry, Button, ContentPane, BorderContainer, TextBox ) { parser.parse(); ready(function(){ var myFeatureLayer; var map = new Map("map",{ basemap: "streets", center:[-105.89, 34.55], zoom: 6, showLabels : "True", logo: false, }); var home = new HomeButton({ map: map }, "HomeButton"); home.startup(); //This connects the Table to the Map map.on("load", loadTable); // This sets the image parameters from the RASTERS from the Map Service var imageParameters =new ImageParameters(); imageParameters.format = "jpeg"; // This adds the RASTERS from the Map Service var dynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer("http://128.123.187.240:6080/arcgis/rest/services/TEST_ET/ET_SSEB/MapServer",{ "opacity" : 0.95, "imageParameters" : imageParameters }); dynamicMapServiceLayer.setVisibleLayers([0]); var layerDefinitions = []; layerDefinitions[0] = "Year"; dynamicMapServiceLayer.setLayerDefinitions(layerDefinitions); map.addLayers([dynamicMapServiceLayer]); function loadTable(){ // Create the feature layer myFeatureLayer = new FeatureLayer("http://128.123.187.240:6080/arcgis/rest/services/TEST_ET/ET_SSEB_YEARLY/MapServer/3", { mode: FeatureLayer.MODE_ONDEMAND, visible: true, outFields: ["*"], id: "fLayer" }); //set map extent on(myFeatureLayer, "load", function(evt){ var extent = myFeatureLayer.fullExtent; if (webMercatorUtils.canProject(extent, map)) { map.setExtent( webMercatorUtils.project(extent, map) ); } }); map.addLayer(myFeatureLayer); myFeatureTable = new FeatureTable({ "featureLayer" : myFeatureLayer, "outFields": ["F2004","name"], "map" : map }, 'TestTable'); myFeatureTable.startup(); on(myFeatureTable, "load", function(evt){ console.log("The load event - ", evt); }); myFeatureTable.on("show-statistics", function(evt){ console.log("show-statistics avgfield - ", evt.statistics.avgField); console.log("show-statistics countfield - ", evt.statistics.countField); console.log("show-statistics maxfield - ", evt.statistics.maxField); console.log("show-statistics minfield - ", evt.statistics.minField); console.log("show-statistics stddevfield - ", evt.statistics.stddevField); console.log("show-statistics sumfield - ", evt.statistics.sumField) }); myFeatureTable.on("row-select", function(evt){ console.log("select event - ", evt[0].data); }); myFeatureTable.on("row-deselect", function(evt){ console.log("deselect event - ", evt[0].data); }); myFeatureTable.on("refresh", function(evt){ console.log("refresh event - ", evt); }); myFeatureTable.on("column-resize", function(evt){ //triggered by ColumnResizer extension console.log("column-resize event- ", evt); }); myFeatureTable.on("column-state-change", function(evt){ // triggered by ColumnHider extension console.log("column-state-change event - ", evt); }); myFeatureTable.on("sort", function(evt){ console.log("sort event - ", evt); }); myFeatureTable.on("filter", function(evt){ console.log("filter event - ", evt); }); } }); }); </script> </head> <body class="claro esri"> <div data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'headline'" style="width:100%; height:100%;"> <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center', splitter:true" style="height:50%"> <div id ="map" class="map"> <div id="HomeButton"></div> </div> </div> <div id="bot" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'bottom', splitter:true" style="height:50%"> <div id="TestTable"></div> </div> </div> </body> </html>
... View more
05-18-2016
09:39 AM
|
0
|
0
|
1670
|
|
POST
|
Hi Rickey, I tried placing it the way you suggested it, still no luck though. Any ideas what else could be causing the alignment? Best, Francisco
... View more
05-18-2016
09:27 AM
|
0
|
7
|
1670
|
|
POST
|
Hi all! I'm having a bit of trouble getting my home button to align correctly inside a content pane. I'm trying to place it under the zoom in/ zoom out button. Below is my CSS and my style. I tried placing it under my map div but that didn't work. Any suggestions? Body: CSS: RESULTS:
... View more
05-18-2016
08:46 AM
|
0
|
11
|
7073
|
|
POST
|
Thanks for all your help Tom! Unfortunately, I think some part of my labels is undefined as a console.log() is indicating. Kindest Regards, Francisco
... View more
05-13-2016
03:41 PM
|
0
|
3
|
1602
|
|
POST
|
Hi Tom, I've tried the following but I'm still getting some errors. It returns tick marks just on the first and last month of my dataset. Am I missing a parameter?? Labels is a global variable. Thanks for all your help! Francisco
... View more
05-13-2016
03:21 PM
|
0
|
5
|
1602
|
|
POST
|
Hi all, I was wondering how to just display the tick marks that correspond to the labels in the time slider? For example, I want to put a tick mark every January of YYYY. I'm getting a tick mark for every time interval which is every month from 1984 to 2013. Thanks for all your help! Francisco
... View more
05-13-2016
02:58 PM
|
0
|
7
|
3130
|
|
POST
|
Thanks Tom! This fixed the issue. However, I have another one now: My date range in my rest services indicate: [1984/01/01 00:00:00 UTC, 2013/01/01 00:00:00 UTC] However on my slider the first date being displayed is December of 1983 and the last date is November 2013. it's shifting the time intervals by one month. Have you ever encountered this before? Best, Francisco
... View more
05-13-2016
10:22 AM
|
0
|
1
|
726
|
|
POST
|
Hi all, I was wondering if anyone knows how to format the date in the "daterange" of the Time Slider. I want it to state: Month Year". My input data was formatted using YYYYMM. Currently, I just get years. Thanks for all your help!
... View more
05-13-2016
08:50 AM
|
0
|
3
|
1998
|
|
POST
|
Robert, I finally got it working. The following method worked: result.feature.attributes['Pixel Value']); Thanks for all your help! Francisco
... View more
05-05-2016
10:19 AM
|
0
|
1
|
1148
|
|
POST
|
Hey Robert, I'm still getting the same error. Could the space in Pixel Value, as shown in the console log have anything to do with it? I'm still getting undefined. Best, Francisco
... View more
05-05-2016
10:16 AM
|
0
|
0
|
1148
|
|
POST
|
Hi Robert, I did the following and it returned this. I believe that I have a syntax error when I use result.PixelValue? Any ideas on what the proper syntax is? Thanks so much! Francisco
... View more
05-05-2016
09:52 AM
|
0
|
4
|
1148
|
|
POST
|
Hi Robert, I tried using this method but I keep getting this result. I attached a picture of it. Do you have any idea what could be going wrong? Here is my code: Thanks! Francisco
... View more
05-05-2016
09:22 AM
|
0
|
6
|
1148
|
|
POST
|
I have map with a raster image loaded on it. The raster image is in my server as a dynamic service. My question is how or what function can I use so when a user clicks on any point on the map, an actual pixel value would show up in a popup? Many thanks.
... View more
05-05-2016
08:59 AM
|
0
|
8
|
2587
|
|
POST
|
Hi Audy, I have the same problem currently, I was wondering if you ever figured out how to tackle this issue? I still get undefined when trying to find the pixel value. Many Thanks.
... View more
05-05-2016
08:49 AM
|
0
|
1
|
5043
|
| Title | Kudos | Posted |
|---|---|---|
| 3 | 03-03-2023 11:27 AM | |
| 1 | 03-24-2016 01:13 PM | |
| 2 | 10-28-2016 03:04 PM | |
| 2 | 04-05-2016 10:03 AM |
| Online Status |
Offline
|
| Date Last Visited |
07-25-2025
07:12 AM
|