On the code Geocoder widget | Guide | ArcGIS API for JavaScript there are two points to explain:
query(".spotlight").addClass("spotlight-active").style({
width: max + "px",
height: max + "px",
margin: margin
});
Does this code add an extra element (the .spotlight element) and ads the spotlight-class to it?
There is already a class with the name .spotlight.
On evt.result.feature.geometry (actually I want to see all the objects the event handler pass as argument). Where are all these properties?
Solved! Go to Solution.
The select event returns a result object with the following properties: extent, feature and name. View the API reference for extent and feature to see the available properties. Name is just a string.
The code below uses dojo/query to look for an element with a class named spotlight assigned. When it finds this element it adds an additional class called spotlight-active.
query(".spotlight").addClass("spotlight-active").style({
width: max + "px",
height: max + "px",
margin: margin
});
You could probably use the JavaScript console in Chrome (f12) or just put this code in: It will alert each key and the value.
for (var key in evt.result){
alert(key+": "+evt.result[key]);}
If it returns [object], which it should on evt.result['feature'], then just change the code to evt.result.feature and then it will return the keys for that object (geometry being one).
The select event returns a result object with the following properties: extent, feature and name. View the API reference for extent and feature to see the available properties. Name is just a string.
The code below uses dojo/query to look for an element with a class named spotlight assigned. When it finds this element it adds an additional class called spotlight-active.
query(".spotlight").addClass("spotlight-active").style({
width: max + "px",
height: max + "px",
margin: margin
});
I want to ask some more things:
1) Is there any way to check if someone has pick an address only from a specified country or to check if someone
has pick a real address from a map?
2) How display only a map from only a specified country?
Please help m(For e to start over the api.
Thanks in advance!
For instance geocoder doesn't display all the addresses from Greece.
So I want someone dbl click and pick an address from the map.
I want to check if this address is from Greece.