Open soomro30 opened 9 years ago
What do you want the sixth tool to do? SearchByBounds is the most complex of the search tools and would require quite a bit of code changes to implement. Another geometry search (such as circle) would be much easier to implement.
you would add the toggle icon for the tool here:
update the view model for the clicking of the toggle icon here (need to turn off other tools when clicked)
then you create an instance of your new widget here (reference how i create an instance of SearchByBoundsWidget):
follow the searchbyBounds widget for some geometry passing event:
inside of ImageDiscoveryWidget you need to listen on an event that your new widget will publish when the user wants to search by their inputs (you convert the input to an esri geometry). in ImageDiscoveryWidget you can see that i am listening on "boundsGeometryCreated" to be called from the bounds widget. This passes the geometry with the event where i use it to call "performSearchCallback" which does the searching.
this.searchByBoundsWidget.on("boundsGeometryCreated", this.performSearchCallback);
Not too complicated but there are a lot of moving parts:
1) add icon to the html template 2) set up viewModel binding 3) create instance of your widget
I will try to create and see if I can manage this. Thank you very much. If I need further help, I will contact you. I appreciate your help...
Thanks. I was able to create another toolbox. Is there any script in the app to convert mgrs to DD.
I need to show footprints based on mgrs.
Regards
Thanks Rivera,
I was able to create the search by coordinates tool but my search buffer is not working.
I have attached the screenshot.
How can I implement search by x,y as a center point and radius buffer as a circle to bring results.
You can see in the image.
On Tue, Jun 23, 2015 at 9:00 PM, Richard Rivera notifications@github.com wrote:
What do you want the sixth tool to do? SearchByBounds is the most complex of the search tools and would require quite a bit of code changes to implement. Another geometry search (such as circle) would be much easier to implement.
you would add the toggle icon for the tool here:
update the view model for the clicking of the toggle icon here (need to turn off other tools when clicked)
then you create an instance of your new widget here (reference how i create an instance of SearchByBoundsWidget):
follow the serchbyBounds widget for eventing:
inside of ImageDiscoveryWidget you need to listen on an even that your new widget will publish when the user wants to search by their inputs (you convert the input to an esri geometry). in ImageDiscoveryWidget you can see that i am listening on "boundsGeometryCreated" to be called from the bounds widget. This passes the geometry with the event where i use it to call "performSearchCallback" which does the searching.
this.searchByBoundsWidget.on("boundsGeometryCreated", this.performSearchCallback);
Not TOO complicated but there are a lot of moving parts:
1) add icon to the html template 2) set up viewModel binding 3) create instance of your widget
- hook display/hide into the icon in step 1
- in ImageDiscoveryWidget listen on an event that passes an esri geometry (you create geometry from user inputs)
- perform the search in ImageDiscoveryWidget (this. performSearchCallback is scoped properly). look at line 399 in ImageDiscoveryWidget to see how I listen for a geometry on the SearchByBoundsWidget
— Reply to this email directly or view it on GitHub https://github.com/Esri/image-discovery-app-js/issues/44#issuecomment-114572655 .
Any way to pass distance variable in
return new Extent(minx, miny, maxx, maxy, new SpatialReference({ wkid: this.searchWkid })); in javascript API.
I want to clone SearchByBounds and create another tool or sixth tool in the geometry. I have tried but it looks very complex. Can you tell me quick way to create another tool of Search By Bounds