I have been playing around with the NearMe widget lately and I really like it. I just have a few enhancements that I think would be beneficial. When the developers version of this comes out I guess I can tinker away at it (any help is appreciated). For now here is what I think would make it just a little bit better.
1. Be able to set a predetermined distance for the buffer and then remove the option from the end user to change it. I guess you would just need to hide the slider when the widget opens.
2. Along the same lines. I noticed that when the user moves the slider to 0 it throws an error saying you can not pick 0. So why not remove that as an option and start at 1?
3. When a user clicks on the map or does the search, if there is only 1 result it would be nice at add a field value right after the layer name. It currently does this when you click to get to the next level but it really is an unnecessary click. A user may only want to see the value from one filed and they could then see it at a quick glance at the top level instead of having to drill in. Drilling in makes sense when there is more then one layer identified.
4. With a search bar in the widget it looks a little redundant to have two search places on a map with only one working with the widget. It would be nice to have one place to input an address and have it tied together. I know you can turn off the search widget as a solution but that is only a work around.
5. It would also be nice to have a place in the widget setup to customize the popup with content
6. How would I change the zoom level when I select a point. I have a basemap that is cached to level 21. When I click on the map it zooms to the closest extent. It would be nice to have an option to only zoom to level 18 for example because 21 is to close.
7. When a polygon is selected it defaults to show in a cyan outline. However if you are zoomed in after the search like in #6 above then you can not see the area of the highlighting and you might not even know that the area is highlighted. It would be nice to zoom out to the extent of the feature being selected.
8. I think it would be nice to zoom to the selected feature once you have drilled in and then zoom to the previous extent when the back button is clicked.
anyway just some thoughts thanks for any help or insights you might have.
Is there a way to use this widget without having to buffer? For example, I would like to simply search for an address or add a location on a map and it automatically comes up with what polygons it falls within (in this case what watershed, district, and outfill basin this address or point is located in). Thanks!
Yes. Kind of. That is also what I want it to do. I made changes mentioned above to item 1 so the user could not change the value and in the set up of the widget I set the maximum distance to 1 and the units to feet. That was small enough for me. If you need it smaller then I bet you could code it to inches or centimeters I guess.
Good Afternoon All,
I Have a question about NearMe widge. After, the Near Me Widget reports the list of features within it's buffer distance, I decided to move to another widget, but the buffere and the symbols still floats and I couldn't know how to trurn them off.
Is it possible to control them on the widget configuratio.
Any help is appreciated.
Stan, Great work with this post so far, and your changes to the NearMe widget that you posted above.
I've been working on a couple of other changes, and thought I would ask your suggestions, and share my one solution.
1) First have you notice that the buffer graphics layer draws on the top of all features? And if you try to select a feature, over the buffer you cannot. I found a solution to this by reorder the buffer graphics layer when it is added in the "_initWidgetComponents" function (Widget.js - line 239 about):
I add this:
Seemed to work for me, just wondering if anyone else thinks this should be default or an option in the configuration.
2) Second, it would be nice to disable the click event when you mouse over a feature that you want to click on the pop up for. Right now the only way to select a feature(show pop up) is for you to close the NearMe widget window, and that disables the "Set location" click event. If someone wants to click on a feature it just re-buffers that location. My first thought is to disable that when you mouse over a feature (all my features are points, so I can see why it wouldn't be good with lots of polygon layers). Not sure if there is a better, easier way to do this. Thought?
3) Third, I am try to have ALL features in the map be selected by the Near Me Widget on application startup. The main reason is to show all the features in the NearMe widget panel on startup, it seems more intuitive as to what the tool does if a selection is already made. (no one reads instructions anymore...)
Any ideas about how to go about that? I've looked at the _getSelectedFeatureFromResult function, as well as the _initWorkflow function. Seems like I could create a new function that mimics a custom selection (all features) and invoke it on widget startup. Any ideas or suggestions?
Thanks again Stan! Go COUGS!
I was wondering if you ever got anywhere with question #3? I am using this widget and, like you, I would really like to display an attribute if there is only one result instead of the field name and right arrow to make an unnecessary click to view another pane. Thanks.
Thank you for your post on the NearMe Widget. I have a question (for anyone to answer). I am using WAB with my AGOL subscription, I do not have an ArcGIS Server. Does anyone know if there is a way to disable the directions settings? I like the buffer and search options but I don't want the widget to consume credits.