|
POST
|
Betsy, Here are some links to some tools to help you with working on your app. I have used all of them, but have been working with Chrome lately. Firefox Firefox Developer Tools > Debugging > Web Console Debugging JavaScript Chrome Using the Console Chrome Dev Tools Introduction to Chrome Developer Tools, Part 1 Internet Explorer Using the F12 developer tools Inspect running JavaScript with the Debugger I found this on this geonet link: Developing Web Apps with ArcGIS API for JavaScript / Building Applications Using the ArcGIS API for JavaScript Resources Regards, Tom
... View more
04-29-2015
09:56 AM
|
1
|
3
|
2669
|
|
POST
|
Betsy, Did you try inspecting the element as it is displayed? That should help by giving you specific information about it. Regards, Tom
... View more
04-29-2015
09:14 AM
|
0
|
0
|
2669
|
|
POST
|
Betsy, Yes! it is .dijitDialogTitleBar. Just set the background color and you should be good to go. I always right mouse click on an element I am interested in on the web page and inspect element. You can see the css attributed to that element. Regards, Tom
... View more
04-29-2015
08:53 AM
|
2
|
6
|
2669
|
|
POST
|
Clinton, Here is a link from the JavaScript API site that discusses creating a re-usable widget. Create a Re-usable Widget | Guide | ArcGIS API for JavaScript Regards, Tom
... View more
04-29-2015
08:07 AM
|
0
|
0
|
1696
|
|
POST
|
Sol, I wouldn't say rely from our perspective. I would say "benefit". We have been scrutinizing our address data for a long time and no one provides more accurate, immediate feedback than our public safety folks. The other departments benefit from having much more accurate data. This is not to say that we don't get feedback from other departments too, just much less. Regards, Tom
... View more
04-29-2015
08:00 AM
|
2
|
0
|
1405
|
|
POST
|
Ben, For our Oracle connections I use the instant client. This unzips to a directory of your choosing. I then add a reference to that directory in the PATH system environment variable. You will probably have to reboot for the path variable to be added. (or add it manually...) You should then be able to add database connections. Regards, Tom
... View more
04-28-2015
05:13 PM
|
2
|
3
|
5760
|
|
POST
|
Sol, Accurate address information is used in several ways at our city. Our 911 services rely on this accuracy to quickly dispatch vehicles to emergency calls. This also adds value after each event. We can use accurate event data to analyze them. We also use accurate addressing in our utility services, permitting and licensing systems. We use a composite locator. We can address 100 blocks, street centerlines and rooftop addresses. We can also locate by business names. Regards Tom
... View more
04-28-2015
02:14 PM
|
2
|
0
|
3745
|
|
POST
|
Clinton, Certainly! The code I used here is from the directions widget sample from ESRI. I modified it to add a query to a point feature service and then took the resulting features and added them as stops to the directions widget. Here is the complete code: <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Query Points & Directions Widget</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.13/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.13/esri/css/esri.css">
<style>
html, body, #map {
height:100%;
width:100%;
margin:0;
padding:0;
}
body {
background-color:#FFF;
overflow:hidden;
font-family:"Trebuchet MS";
}
</style>
<script src="http://js.arcgis.com/3.13/"></script>
<script>
require([
"esri/urlUtils", "esri/map", "esri/dijit/Directions",
"esri/tasks/query", "esri/tasks/QueryTask",
"dojo/parser",
"dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/domReady!"
], function(
urlUtils, Map, Directions, Query, QueryTask,
parser
) {
parser.parse();
//all requests to route.arcgis.com will proxy to the proxyUrl defined in this object.
urlUtils.addProxyRule({
urlPrefix: "route.arcgis.com",
proxyUrl: "/sproxy/"
});
urlUtils.addProxyRule({
urlPrefix: "traffic.arcgis.com",
proxyUrl: "/sproxy/"
});
var map = new Map("map", {
basemap: "streets",
center:[-98.56,39.82],
zoom: 4
});
var directions = new Directions({
map: map
},"dir");
directions.startup();
var queryTask = new QueryTask("URL to your point feature class");
var query = new Query();
query.returnGeometry = true;
query.outFields = ["*"];
query.where = "1=1";
queryTask.execute(query, showDirections);
function showDirections(results) {
directions.addStops(results.features);
directions.getDirections();
}
});
</script>
</head>
<body class="claro">
<div data-dojo-type="dijit/layout/BorderContainer"
data-dojo-props="design:'headline', gutters:false"
style="width:100%;height:100%;">
<div data-dojo-type="dijit/layout/ContentPane"
data-dojo-props="region:'right'"
style="width:250px;">
<div id="dir"></div>
</div>
<div id="map"
data-dojo-type="dijit/layout/ContentPane"
data-dojo-props="region:'center'">
</div>
</div>
</body>
</html> Regards, Tom
... View more
04-28-2015
10:50 AM
|
0
|
3
|
1696
|
|
POST
|
Mark, Here is a thread that discusses the problem too. Does it work using other web browsers and fail only when viewing in Internet Explorer? What causes IE to choke on WAB sites? Regards, Tom
... View more
04-27-2015
04:36 PM
|
2
|
0
|
2181
|
|
POST
|
Clinton, The result of a query will provide features that can be used to immediately populate your directions. The following example queries some points and then adds the resulting points to the directions widget. After they have been added you can call getDirections to retrieve driving directions to each location. var map = new Map("map", {
basemap: "streets",
center:[-98.56,39.82],
zoom: 4
});
var directions = new Directions({
map: map
},"dir");
directions.startup();
var queryTask = new QueryTask("your_URL_to_query");
var query = new Query();
query.returnGeometry = true;
query.outFields = ["*"];
query.where = "1=1";
queryTask.execute(query, showDirections);
function showDirections(results) {
directions.addStops(results.features);
directions.getDirections();
} Regards, Tom
... View more
04-27-2015
02:21 PM
|
0
|
5
|
1696
|
|
POST
|
Stefano, Perhaps you could create two featurelayers and set the definition expression for each one for the time ranges for comparison? FeatureLayer | API Reference | ArcGIS API for JavaScript Regards, Tom
... View more
04-27-2015
10:03 AM
|
0
|
0
|
883
|
|
POST
|
Sundus, Yes, you must query something. You can query by IDs, by attributes or spatially. Your original post had all the parameters except what to query. Regards, Tom
... View more
04-25-2015
07:49 AM
|
1
|
5
|
3059
|
|
POST
|
Sundus, It looks like you are just wanting to display data from the feature class table. Adding a where clause will work for this purpose. Here is an example based on a sample from the ESRI JavaScript API page. I have modified it to use your service. ESRI Sample: Query data without a map | ArcGIS API for JavaScript <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--The viewport meta tag is used to improve the presentation and behavior of the samples
on iOS devices-->
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Query Musanda Project Details</title>
<script src="http://js.arcgis.com/3.13/"></script>
<script>
require([
"dojo/dom", "dojo/on",
"esri/tasks/query", "esri/tasks/QueryTask", "dojo/domReady!"
], function(dom, on, Query, QueryTask) {
on(dom.byId("execute"), "click", execute);
function execute() {
queryTask = new QueryTask("URL to your Map Service");
//build query filter
query = new Query();
query.where = "ESRI_OID > 0";
query.returnGeometry = false;
query.outFields = ["*"];
query.spatialRelationship = Query.SPATIAL_REL_INTERSECTS;
queryTask.execute(query, showResults);
}
function showResults(results) {
var resultItems = [];
var resultCount = results.features.length;
for (var i = 0; i < resultCount; i++) {
var featureAttributes = results.features.attributes;
for (var attr in featureAttributes) {
resultItems.push("<b>" + attr + ":</b> " + featureAttributes[attr] + "<br>");
}
resultItems.push("<br>");
}
dom.byId("info").innerHTML = resultItems.join("");
}
});
</script>
</head>
<body>
Projects:
<input id="execute" type="button" value="Get Details">
<br />
<br />
<div id="info" style="padding:5px; margin:5px; background-color:#eee;">
</div>
</body>
</html> I hope this helps! Regards, Tom
... View more
04-24-2015
08:18 AM
|
1
|
1
|
3059
|
|
POST
|
Sundus, A more complete code listing would be helpful to diagnose your problem. It may be a poorly formed query that is not returning any results. Do you have a where clause or are you querying by an ID or spatially? Regards, Tom
... View more
04-23-2015
08:59 AM
|
0
|
0
|
3059
|
|
POST
|
Nigel, I believe by default snapping is available. You can expressly set snapping parameters for the edit tool or draw tool. Here is an excerpt from the API reference: snapMode property snapMode:String Since : ArcGIS API for Flex 2.5 Specifies whether snapping is off, always on or enabled by pressing the Ctrl key. The default value is SNAP_MODE_ON_DEMAND . This property can be used as the source for data binding. Implementation public function get snapMode():String public function set snapMode(value:String):void I put together a measure widget that is a variation of the draw tool. It also has snapping capability. You can view it here: Yakima CityFlex Viewer - measure widget Here is a code snippet from my measure widget setting the draw tool snapping parameters: <esri:DrawTool id="measureDrawTool" map="{map}" snapDistance="20" snapMode="onDemand" snapOption="vertex" showDrawTips="{showDrawingTips}" drawEnd="map_drawEndHandler(event)" graphicsLayer="{graphicsLayer}" lineSymbol="{lineSymbol}" fillSymbol="{fillSymbol}" /> I hope this helps you! Regards, Tom
... View more
04-23-2015
08:15 AM
|
1
|
0
|
830
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-24-2023 10:45 AM | |
| 1 | 05-19-2023 08:13 AM | |
| 1 | 02-22-2023 09:12 AM | |
| 1 | 05-15-2015 03:11 PM | |
| 1 | 02-10-2015 11:52 AM |
| Online Status |
Offline
|
| Date Last Visited |
02-26-2024
04:50 PM
|