|
POST
|
How about something like.... var elems = document.getElementsByClassName("form-control");
for(var i = 0; i < elems.length; ++i)
{
elems.value = "";
}
... View more
05-14-2015
02:42 PM
|
2
|
1
|
1836
|
|
POST
|
The labels are probably defined in the MXD that was used to publish the data so, more than likely, they were never actually part of the dataset's attributes. Anyways, I suppose you could retrieve a copy of the layer's legend in JSON format using the REST API: http://geodata.md.gov/imap/rest/services/Biota/MD_BenthicHabitat/MapServer/legend?f=json JS code wise, something like this: var url = "http://geodata.md.gov/imap/rest/services/Biota/MD_BenthicHabitat/MapServer/legend?f=json";
var requestHandle = esriRequest({
url: url,
content: {
f: 'json'
},
handleAs: "json"
});
requestHandle.then(
function (theJSON, io) {
//no problems encountered. Process content stored in theJSON..
}, function (err) {
//Error encountered while retrieving the JSON version of the legend..
}
}; The above would need AMD references for "dojo/_base/json", "esri/urlUtils", and "esri/request" What you could do is step through the legend information and maybe build an array of code/labels. When your user clicks on a feature, use an infoWindow setContent function to look up the matching label and present whatever information you want to your users.
... View more
05-14-2015
01:50 PM
|
0
|
1
|
2356
|
|
POST
|
Regretfully, I don't know this stuff but the thread I linked suggests that you may have to upgrade to SQL 2012 to support pagination. I hope someone else with more knowledge will chime in and add more to the discussion.
... View more
05-13-2015
12:27 PM
|
0
|
0
|
2117
|
|
POST
|
I don't know if this directly is the source of your issue but, based on this somewhat recent thread, pagination support is dictated by the underlying database.
... View more
05-13-2015
09:12 AM
|
0
|
2
|
2117
|
|
POST
|
I'd like to bump this up from the grave for an update from ESRI. ArcGIS Explorer Online is built on a Silverlight platform so we all know that it's a platform on its way out. Based on information found on this page on ESRI's website, they indicate that they are in development of a desktop version of Explorer for ArcGIS. Lord only knows when this graphic was last updated so it begs the question- what is the status of this development and when can we look forward to a desktop replacement version of ArcGIS Explorer Online? I still use Explorer Online on a fairly regular basis and would hope that I'm not the only one. Thanks! Steve
... View more
05-12-2015
12:08 PM
|
0
|
0
|
1247
|
|
POST
|
I tried using the dojo charting capabilities but ran into issues (at the time, our organization also used IE-8 as the standard browser version). I would recommend looking into other options (and there are many). For my situation, I use two different options- the Highcharts JS library and the Google charts API. You'll have to evaluate either to see which works best for what you have to do. I will note that the Highcharts option does incur a cost (free to evaluate, though) but the cost seemed minimal ($70 for usage on one site/application). I've been pretty happy with Highcharts but you mileage may vary.
... View more
05-11-2015
08:29 AM
|
0
|
3
|
3086
|
|
POST
|
I suppose one could use the map's layer-add-result event to populate a boolean variable to log each layer's status. A caveat being that this would only capture any initial efforts to add the layer. If something goes south after map load, this wouldn't help.
... View more
05-11-2015
08:22 AM
|
0
|
0
|
3866
|
|
POST
|
You said you have two issues. Is the other issue happening first? I've experienced situations where valid code broke due to an issue elsewhere in my code.
... View more
05-01-2015
11:55 AM
|
2
|
1
|
2685
|
|
POST
|
How about.... If( (document.getElementById("eMail").value == null) || (document.getElementById("eMail").value == "") ) { You could also try '===' (three equal signs) instead of '=='
... View more
05-01-2015
11:25 AM
|
2
|
1
|
2685
|
|
POST
|
Thanks Rene Rubalcava for chiming in and for writing the blog post. I think every little bit of information helps so the greater the searchable archive there is, the better. For me, personally, the meat of your blog post is an aspect of the AMD migration that I think I roughly understand (well- up to the point of actually beginning the code migration). I'm still unsure about some specific aspects of migration that I will need to address: What to do about "third party" JS libraries such as Jquery, Highcharts, date.js, etc? Do you just load them as always via HTML <script> tags or do you need to do something else for AMD? Dojo Modules are really class modules so they end up being an object with properties and methods. But this isn't necessarily what's going on in my legacy JS file. I've grouped various functions into one file but only because they concern themselves with a specific "topic", NOT an object. In the world of AMD, you end up with this: define(function(){
var privateValue = 0;
return {
A: function(){
//some work
},
B: function(){
//some work
},
C: function(){
//some work
}
};
}); But what if function A needs to call function B, and function B then needs to call C? How is that coded? Again, I point to my original post. I have a legacy JS file which generates a report. The initial function is called by a user button click located inside an infoWindow. That initial function passes the selected feature to another function which generates a buffer based on an analysis buffer. That result is then passed to another function which then processes the results. As you can see, I'm three functions deep at this point. I'm not clear how to migrate this process to AMD.
... View more
05-01-2015
08:32 AM
|
0
|
0
|
3210
|
|
POST
|
I have not done this but the REST API can return a layer's legend information as a JSON object. Within the framework of the Javascript API, you would use the esri/request object to obtain the legend info via the REST API call. Again, I haven't done this but it is covered in Rene Rubalcava's ArcGIS Web Development book on page 53. Steve
... View more
04-29-2015
08:08 AM
|
0
|
1
|
1599
|
|
POST
|
I have two- one public facing and the second is internal. Anything new I develop uses the AMD style but is still constrained to a one JS file structure. I need to figure this out so I can really move forward. ESRI has reassured us that the older APIs will still exist and remain available but I'm real wary about trusting that.
... View more
04-28-2015
09:38 AM
|
1
|
1
|
3210
|
|
POST
|
I don’t know how effective this post will be but I’m having a real hard time understanding how to migrate my projects previously written using the legacy style Dojo over to the AMD framework. First, let me state that I DO understand the structure of ESRI’s AMD styled samples where the JS code is either all in the HTML file or as a single, standalone JS file. I’ve seen and read this ESRI blog post. My comprehension goes away when I look at my own projects where I have developed my code across multiple JS files. I’m attaching a PDF that is typical of how one of my legacy projects is structured. I want to focus the discussion at a higher level so the nitty gritty code is included. Anyways, I have one JS file (initMap.JS) that contains the initialization function along with all the various dojo.require() statements. I might also have another JS file that contains pure JS functions (shown here as jsFunctions.JS) that do things such as read or write browser cookies, test for functionality, format dates, etc. Lastly, I’ll also have one or several additional JS files which focus on a specific topic or functionality. In my example here, mapFunctions.JS contains a function which zooms the map to a selected feature and two functions which format the content for a layer’s infoWindow. The reportFunctions.JS file generates an HTML report in a new browser window and contains four functions which basically run sequentially (execute->buffer->query->process results). I feel that it’s pretty straightforward to convert initMap.JS to an AMD style JS file. But what about mapFunctions.JS and the other JS files? I’m assuming that I need to convert these into “modules” but I don’t understand some aspects such as how I set up a file like my reportFunctions.JS which contains functions that call each other within the JS file. And where do external JS libraries such as JQuery fit into all of this? Do I need to do anything AMD related or just add a link in the HTML header as before? I bought the book on ArcGIS Web Development by Rene Rubalcava and I feel that it does help me slightly but not all the way (probably because his coding style is different than the way my JS has developed). I kinda understand Rene’s technique of going from RUN.JS to MAIN.JS (pgs 80-84) but not much thereafter. To borrow a phrase from Apple, maybe I’m “not doing it right.” I might not be too far from that “a-ha!” moment but I’m currently stymied.
... View more
04-28-2015
08:16 AM
|
0
|
6
|
9285
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Friday | |
| 1 | Thursday | |
| 1 | Thursday | |
| 1 | Thursday | |
| 1 | Wednesday |