Hi Friends, if some one can help me or give any idea how i can query the Feature Access Service in a WebApp Builder if i pass the parameter in the url with the OnLoad Event, i have this code idea:
url = http://localhost/webApp/Index.html?CountryCode = 1
I get the code with javaScript Code and then i pass to QueryTask in JavaScript in the MapManager
mapMain.graphics.clear();
var x = "URL PARAMETER GET"
//alert(x);
var query2 = new Query();
query2.outFields = ["CODIGO_CATASTRAL,MUNICIPIO"];
query2.returnGeometry = true;
query2.where = "COUNTRY_CODE= '"+x+"'";
queryTask2.execute(query2, CreateGraphics);
.
.
.
If some one Have any idea of how to do that its be very helpfull thanks !
Solved! Go to Solution.
Juan,
In the MapManger.js file you have access to this.urlParams that will give your the url parameters.
Juan,
In the MapManger.js file you have access to this.urlParams that will give your the url parameters.
Juan,
Did you try my suggestion?
Hi Robert Thank you, i forget answer and mark as correct , yes its work perfect, when i call the parameter but i have another problem, I need to set that param value to make a DefinitionQuery to a layer that was add in the webMap, the problem is when i use the getLayersId i just get the basemap id but not the other layer to setDefinitionQuery, do you have any idea ?
Juan,
If the layer if a FeatureLayer then you have to use the maps graphicsLayerIds property instead of the layerIds property.
Robert Thank you so much, i can query with the GraphicLayerIds and works perfect !