POST
|
So I'm having the same error and I think the same problem. I'm not sure if your issue is the same but I only have the problem on our Internal network. If I try and acess the same page from outside our network, the page lo0ads fine so I suspect it is our firewall blocking the Cross site script header or something like that.
... View more
02-21-2017
07:02 AM
|
0
|
0
|
377
|
POST
|
That works. I'm not exactly sure why that worked and the other things I tried didn't.
... View more
06-17-2014
05:10 AM
|
0
|
0
|
214
|
POST
|
May or may not work as expected but Thought I would point you in a possible right direction. you should be able to use a the set interval function in Javascript to do what your trying to do. var refreshevent = setInterval(function (evt)
{
refreshcount++;
var timequery = new query();
alert("fewsquerytask==" + config.fewsQueryTaskService);
var queryTask = new QueryTask(config.fewsQueryTaskService);
timequery.returnGeometry = false;
timequery.outFields = ["PACKET_DATE_TIME"];
timequery.where = "PACKET_DATE_TIME is not null";
queryTask.execute(querytime, showTime);
function showTime(listfeatures)
{
alter("inside showTime");
var feature = listfeatures.features[0];
var value = feature.attributes["PACKET_DATE_TIME"];
alert("packet value==" + value);
dom.byId("packettime").innerHTML = "Refresh: "+refreshcount+" Packet Time: " + value;
}
},900000);
... View more
06-16-2014
11:00 AM
|
0
|
0
|
249
|
POST
|
So I'm using the MAP div as par of a website and not displaying it at full extent of the browser window. http://jsfiddle.net/644nr/ when I have the search and locate button div inside the map div it bumps the map down and messes with the on click location. (see link) if I move the divs outside of the map div I can use relative and move them with css but then I have issues making them disappear on a button click. This is part of a larger project that allows users to filter data based on location on a map. my end goal was to make the map appear on button click after the page loads. Just stumped and I'm sure its just something I am over looking... I mean the zoom widget does what I want the other divs to do so it has to be possible. Any help is appreciated.
... View more
06-16-2014
10:48 AM
|
0
|
2
|
584
|
POST
|
Thanks for the response. I thought that 'find-results' would only happen when results where where returned based off the api summery. Worked like charm in my app.
... View more
05-09-2014
06:41 AM
|
0
|
0
|
254
|
POST
|
I'm new to the Javascript API but not new to Javascript, but maybe rusty admittedly. I'm having a hard time figuring out how to catch when a custom geocoder does not return an address for entered search. Example coded below. Search for "hay" and the display div is populated with the returned name "Hay street". if you search for "super street" , which returns nothing. I would want it display "no information" Anyone able to guide me in the right direction. <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"> <title></title> <link rel="stylesheet" href="http://js.arcgis.com/3.9/js/esri/css/esri.css"> <style> html, body, #map { height: 100%; width: 100%; margin: 0; padding: 0; } #search { display: block; position: absolute; z-index: 3; top: 20px; left: 75px; } #display { padding-top:200px; } </style> <script src="http://js.arcgis.com/3.9/"></script> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script> require([ "esri/map", "esri/dijit/Geocoder", "dojo/dom", "dojo/domReady!" ], function( Map, Geocoder, dom ) { // create a map and instance of the geocoder widget here var myGeocoders = [{ url: "http://gis.ci.fayetteville.nc.us/arcgis/rest/services/Composite_Locator/GeocodeServer", name: "Composite_Locator", singleLineFieldName: "Street" }]; var geocoder = new Geocoder({ autoComplete: true, arcgisGeocoder: false, geocoders: myGeocoders }, dom.byId("search")); // map.on("load", enableSpotlight); geocoder.on("select", showLocation); // geocoder.on("clear", removeSpotlight); function showLocation(evt) { // console.log(evt) $('#display').append(evt.result.name); // console.log(evt.result.name) } }); </script> </head> <body class="soria"> <div id="search"></div> <div id="display"></div> </body> </html>
... View more
05-08-2014
11:48 AM
|
0
|
2
|
361
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|