All of a sudden - with no code update from me - the symbols for the identifytask on my web application have stopped rendering. Has anyone else experienced this?
Do you have a public site or can you post your code here or on jsbin ?
Does this help?
function initFunctionality () {
map.on("click", doIdentify);
identifyTask = new IdentifyTask("SERVICEURL");
identifyParams = new IdentifyParameters();
identifyParams.tolerance = 10;
identifyParams.returnGeometry = true;
identifyParams.layerIds = [0,3,5,7,10,11,14,22,25,26];
identifyParams.layerOption = IdentifyParameters.LAYER_OPTION_ALL;
identifyParams.width = map.width;
identifyParams.height = map.height;
symbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID,
new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,
new Color([143, 73, 102]), 2),
new Color([143, 73, 102, 0.25]));
//if there are url params zoom to location
var coords, zoomLevel;
var urlObject = esri.urlToObject(document.location.href);
if(urlObject.query && urlObject.query.coords && urlObject.query.zoomLevel){
var coords = urlObject.query.coords.split(',');
var lon = parseFloat(coords[0]);
var lat = parseFloat(coords[1]);
var zoomLevel = parseInt(urlObject.query.zoomLevel);
var point = esri.geometry.geographicToWebMercator(new esri.geometry.Point(lon,lat));
map.centerAndZoom(point,zoomLevel);
}
For me it would help if the full JavaScript were there including your require statements and web services. Are you able to post the whole page?
Hey Chris,
Thanks for the offer to help. Take a look at this page. This is the code I've used in my application as well. And it appears no geometry is symbolized in this example either.
Identify Sample
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.