I tried adding the "Nearby" widget from the "http://github.com/BrianBunker/cmv-widgets/tree/master//Nearby" user contributions. This appears to be an older widget and doesn't seem to work with CMV 2.0 when JUST editing the viewer.js file for this widget. Is there anything special I am missing? I am new to CMV and only a general hack JS programmer.

2 Answers 2



We worked hard to maintain backwards compatibility for contributed widgets. I can't speak for every widget contributed over the past several years but the widgets that I have tested or used in applications for my clients do work in CMV version 2.0 without any code changes. This covers the vast majority of widgets including Brian's Nearby widget.

Some of the layers used by the widget in Brian's demo do not have a SHAPE field so cause an error in the widget. This is not related to the version of CMV used.

Also, this widget may require the use of a proxy to retrieve the data - this is due to browser restrictions. That is the case in Brian's demo. You may need a proxy to use it in your application - that depends on where your data is located.

  • I was able to some of the older widgets installed and working... the ones that were not too complex such as the goto coordinates widget. I am still trying to get "nearby" working, the "spinner" (indicating loading) just keeps spinning. I think it me not configuring it correctly as I am still getting used to how to deal with the proxy and some of my own layers. Overall - I love CMV and it is great.
    – roper
    May 24, 2017 at 17:49

@tmcgee have you checked that the advanced search widget works? I have tried to implement it with 2.0, but have not succeeded. It was referencing a Controller.js file in the previous version, and those files appear to have since been deprecated or placed into multiple config files with 2.0. I posted on Github about 19 days ago to see if anyone else had any issues or could offer a suggestion. However I have not gotten any responses. Your comments here lead me to believe, that is is a me problem, and not the widget. Therefore I want to check with you in that regard.

  • Looks to me as bad design in that widget. The Controller is included in the modules but never referenced in code. It could be removed. I have never seen a need to include the controller in any widget.
    – tmcgee
    May 28, 2017 at 15:40
  • @tmcgee Have you successfully implemented the Advanced Search Widget in 2.0? I am not having great success, but I swear I am following the README.md as directed...
    – Dru
    May 30, 2017 at 13:24
  • @tmcgee the widget appears to me that it relies on the Controller.js, and that file is non-existent in version 2.0. When you add the Controller.js to the folder js/viewer the widget works, however it will not show the results in the attributes table until you resize the bottom pane. I assume this is because some other function is blocking this, I am just not sure which one, or how to fix it. Without the Controller.js file when you click the widget it does not function. Here is my public URL if you are interested: bhgis.org/cmv/test
    – Dru
    May 30, 2017 at 18:41
  • I have never implemented the Advanced Search widget since I prefer to use my own search widget. Instead of adding an out of date file (Controller.js) to your project that is not necessary for the widget to function, you (or the widget developer) should remove the references to Controller at the top of the widget file - line 3 and line 76.
    – tmcgee
    May 31, 2017 at 19:40
  • @tmcgee thanks for your reply, just a few questions... 1.) Do I have the ability to go into the files and remove them on GitHub? Would that be like a commit? Sorry I am not to familiar with GitHub, and am relatively new to all of this. 2.) I did remove the references to the Controller at line 3 and 76 as you suggested however there is still an issue with the selection not showing up in the attributes table until you either collapse the side pane or resize the bottom pane.
    – Dru
    Jun 2, 2017 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.