POST
|
Faryal, there is no prebuilt widget that I know of to do this. You will need to create or locate a weather service to bring into your application. Just doing a quick google search brings up a couple of things that may help you. Public Information Map This is an ArcGIS Online map that contains a radar service, NOAA weather alerts, and it looks like an accuweather service. https://www.arcgis.com/home/item.html?id=d16d53126f1243a3a7a7f1d0dff39662 This is the webmap that powers the above application. The layers in the map may be of particular use to you.
... View more
07-06-2017
10:58 AM
|
0
|
0
|
941
|
POST
|
Not a problem Prasad. If this works for you, be sure to mark it as the answer.
... View more
05-08-2017
06:03 AM
|
0
|
0
|
713
|
POST
|
ESRI's "Search" dijit has this functionality you described. You can hook it up to multiple sources and feed it fields to autocomplete as the user is typing. This is available in v.3 & v.4. API references below: Search | API Reference | ArcGIS API for JavaScript 3.20 Search | API Reference | ArcGIS API for JavaScript 4.3
... View more
05-04-2017
06:03 AM
|
0
|
2
|
713
|
POST
|
This may not directly answer your question, but it appears as if ESRI has been tweaking the FeatureLayers for performance in the JS API 4.3. May be worth looking into. ArcGIS API for JavaScript 4.3 and 3.20 Released | ArcGIS Blog
... View more
03-06-2017
06:03 AM
|
1
|
0
|
469
|
POST
|
I've not had experience with integrating an AVL system, but just a thought, could you use an SQL SELECT DISTINCT statement on your view in order to pull just the first record for each matching id? You would still have to have refresh on the services, but that could be a crude way of getting just the data that you need.
... View more
02-17-2017
05:55 AM
|
0
|
0
|
1557
|
POST
|
Do you get the expected results from your first query? Thats where I would start. I put up a fiddle of how I do nested queries here: JS_Search - JSFiddle (note that the services don't work, since JSFiddle requires https://, but I promise the app works normally.) The fiddle searches for attributes using a findTask, then grabs the geometry from the results and uses that to perform a spatial search for polygon attributes. not exactly what you are trying to do, but similar.
... View more
02-13-2017
08:04 AM
|
2
|
0
|
572
|
POST
|
I am with a county government, and being an ESRI and Laserfiche shop, we tried implementing geodocs a couple of years ago. That was when they utilized now defunct silverlight and flex apps, and it appears that they now have an html5 app. For what it was, it was pretty neat. The key feature in my mind was that it creates an index between your spatial features and the laserfiche documents, utilizing laserfiche metadata to do so. Unfortunately, the project never really took off for us. The department that we set it up for doesn't do much in terms of laserfiche organization, so the search results that the app was returning weren't particularly useful. This was not a fault of the app though, just poor LF organization. As I'm typing this of course, we are looking at giving geodocs or some kind of custom integration between GIS and LF another go. These things never die... EDIT: And to your point on it only using AGOL, when we set it up, it did not use AGOL at all. We had a REST service setup on our ArcGIS Server that it utilized, and then weblink on the LF end. Looking through their sparse documentation on their website, that portion does not appear to have changed.
... View more
01-11-2017
12:33 PM
|
2
|
1
|
1982
|
POST
|
Good morning Robert, I was not aware of the dojo/promise/all function, but that looks like exactly what I need. I knew that I wasn't formatting my code in the proper way to deal with promises somehow. Thanks so much for your help!
... View more
09-20-2016
06:13 AM
|
0
|
1
|
1002
|
POST
|
So I'm new to working with promises, but I'm having trouble wrapping my head around these asynchronous requests. I am running a QueryTask within a result loop from a FindTask. I am outputting all results to an array, to display once everything finishes up. The issue I am experiencing comes with accessing the results. I can pull out the results from the FindTask with no problem, but when I perform an "execute().then()" statement for my query task, those results are not returned until the promise resolves. However, I would like to access those results sooner (e.g. as soon as that query task is executed). My question is, is there any way to execute a QueryTask without using Promises? Or is there a way to return results immediately within a promise? My code is posted below for clarification. the goal is to perform a spatial query based off of the returned result of a FindTask, without displaying a map. Any help or tips are much appreciated! <script>
require([
"esri/tasks/QueryTask",
"esri/tasks/support/Query",
"esri/tasks/FindTask",
"esri/tasks/support/FindParameters",
"dojo/_base/array",
"dojo/dom",
"dojo/on",
"dojo/domReady!"
], function(QueryTask, Query, FindTask, FindParameters, arrayUtils, dom, on) {
var loadingImg = dom.byId("loading");
// Create a FindTask pointing to a map service
var find = new FindTask({
url: "http://gis2.co.frederick.va.us/arcgisweb/rest/services/FC_GIS/FCBase_TEST/MapServer"
});
// Set parameters to only query the point layer by name
var params = new FindParameters({
layerIds: [6],
searchFields: ["ADDRESS"],
returnGeometry: true
});
// Query task REST endpoint for polygon layer to be queried.
var qt = new QueryTask({
url: "http://gis2.co.frederick.va.us/arcgisweb/rest/services/FC_GIS/FCBase_TEST/MapServer/0"
});
resultsarray = [];
// Executes on each button click
function doFind() {
// Display loading gif to provide the user feedback on search progress
loadingImg.style.visibility = "visible";
// Set the search text to the value of the input box
params.searchText = dom.byId("inputAdr").value;
// The execute() performs a LIKE SQL query based on the provided text value
// showResults() is called once the promise returned here resolves
// find.execute(params).then(showResults, rejectedPromise);
find.execute(params)
.then(doGeoQuery)
.otherwise(rejectedPromise);
debugger;
}
function doGeoQuery(response) {
// "response.results" is the data object containing fields and geometry from the found feature
var results = response.results;
arrayUtils.forEach(results, function(findResult, i) {
// Get each value of the desired attributes
var geo = findResult.feature.geometry;
var adr = findResult.feature.attributes.ADDRESS;
var recnum = findResult.feature.attributes.RECNUM;
resultsarray.push(adr);
resultsarray.push(recnum);
console.log("geo",geo);
console.log("adr",adr);
console.log("recnum",recnum);
var spatialquery = new Query();
spatialquery.outFields = ["PIN", "MLNAM"];
spatialquery.geometry = geo;
spatialquery.spatialRelationship = "intersects";
// execute QueryTask
qt.execute(spatialquery).then(function(spatialresults) {
console.log("spatialresults.features", spatialresults.features);
resultsarray.push(spatialresults.features[0].attributes.MLNAM);
resultsarray.push(spatialresults.features[0].attributes.PIN);
console.log("resultsarrayloop",resultsarray);
})
});
debugger;
resultsTable.innerHTML = "";
// If no results are returned from the task, notify the user
if (resultsarray.length === 0) {
resultsTable.innerHTML = "<i>No results found</i>";
loadingImg.style.visibility = "hidden";
return;
}
//console.log("resutls",results);
// Set up row for descriptive headers to display results
var topRow = resultsTable.insertRow(0);
var cell1 = topRow.insertCell(0);
var cell2 = topRow.insertCell(1);
var cell3 = topRow.insertCell(2);
var cell4 = topRow.insertCell(3);
//var cell5 = topRow.insertCell(4);
cell1.innerHTML = "<b>Address</b>";
cell2.innerHTML = "<b>Recnum</b>";
cell3.innerHTML = "<b>MLNAM</b>";
cell4.innerHTML = "<b>PIN</b>";
//cell5.innerHTML = "<b>geometry</b>";
console.log("resultsarray",resultsarray);
debugger;
// Loop through each result in the response and add as a row in the table
arrayUtils.forEach(results, function(findResult, i) {
// Get each value of the desired attributes
var adr = resultsarray[0];
var recnum = resultsarray[1];
var nam = resultsarray[2];
var pin = resultsarray[3];
// Add each resulting value to the table as a row
var row = resultsTable.insertRow(i + 1);
var cell1 = row.insertCell(0);
var cell2 = row.insertCell(1);
var cell3 = row.insertCell(2);
var cell4 = row.insertCell(3);
//var cell5 = row.insertCell(4);
cell1.innerHTML = adr;
cell2.innerHTML = recnum;
cell3.innerHTML = nam;
cell4.innerHTML = pin;
//cell5.innerHTML = geo;
debugger;
});
}
var resultsTable = dom.byId("tblAdr");
// Executes each time the promise from find.execute() is rejected.
function rejectedPromise(err) {
console.error("Promise didn't resolve: ", err.message);
debugger;
}
// Run doFind() when button is clicked
on(dom.byId("findBtn"), "click", doFind);
});
</script>
... View more
09-16-2016
02:44 PM
|
0
|
3
|
3255
|
POST
|
Wow I hadn't realized that....Hopefully they add those in soon, because most of my apps rely on those mouse events. I'm not seeing it anywhere in the documentation though. I won't be making the jump to 4.0 until then.
... View more
05-20-2016
06:47 AM
|
0
|
0
|
1566
|
POST
|
I appears that for v4.0, esri ditched the dijit popup, and added it into the "MapView" class. MapView | API Reference | ArcGIS API for JavaScript 4.0 You should be able to utilize the same logic in the new class utilizing mouse-over, mouse-out, and click events.
... View more
05-17-2016
06:24 AM
|
0
|
0
|
1566
|
POST
|
Thanks for the help and suggestions everyone! I didn't have any luck with the embed and object tags either. The only way I could get the swiping to work was disabling the mouse-events on the div that the iframe sits within. Of course that renders the app completely useless. I'll keep the forum posted if I come across any other solutions/workarounds
... View more
12-03-2015
07:26 AM
|
0
|
2
|
772
|
POST
|
Thanks for the article on responsive design Tyrone, good tips on sizing in there. I tried to make the app as responsive as I could so that it re-sizes nicely.
... View more
12-01-2015
02:08 PM
|
0
|
0
|
1838
|
POST
|
Thanks for the response Chris. I tried adding those lines to the mapdiv itself, which then overflowed and scrolled within the iframe. that still didn't scroll the whole parent frame though. I added it to the styling for the iframe and iframe wrapper div within my CMS as well to no avail.
... View more
12-01-2015
02:07 PM
|
0
|
9
|
1838
|
POST
|
Hello, I have a question that is probably more general web dev related than javascript api related, but I figured this would be the place to start. I have a small javascript app that I am integrating into our webpage CMS through an iframe. I've disabled the map pan and zoom functions in javascript so that users can't interact with the map other than click on the polygons to take them to another webpage. My issue comes with viewing this webpage on a mobile device. Whereas a user will typically swipe upward on a phone to scroll the page down, this functionality seems to be disabled when the user tries to swipe over the map div. interestingly enough, if the user swipes over any of the other divs, (logo, button, title), it will scroll just fine. I would like the user to be able to scroll over the entire page, including everything in the iframe. I thought it might have something to do with content overflow in the iframe, so I tried setting the iframe in a div and styling that to: overflow: hidden; That didn't work either. Has anyone else experienced this behavior with esri map divs? edit: here is the link to the iframed page: Frederick County : Testmappage
... View more
12-01-2015
12:11 PM
|
0
|
14
|
6479
|
Title | Kudos | Posted |
---|---|---|
1 | 01-18-2023 08:31 AM | |
1 | 02-15-2022 07:10 AM | |
1 | 12-14-2021 07:46 AM | |
1 | 11-06-2015 05:51 AM | |
1 | 03-04-2014 07:17 AM |
Online Status |
Offline
|
Date Last Visited |
09-03-2024
05:58 PM
|