eBasemap Widget v1.2 - Create Widget Error

5467
19
Jump to solution
10-15-2015 09:40 AM
MegPeterson
New Contributor III

Hi all -

First off, please let me know if this is not the right forum to post questions about Robert's widgets. I'm new to the GeoNet environment.

I'm getting started with WAB Dev Ed v. 1.2 and am following the instructions for adding custom widgets to the Client/Stempap folder.

When I load the eBasemap widget and edit it, the basemaps that I want for to the application appear and their urls are correct.

bm_error2.JPG

But then when II test the tool after saving, I get one or both of the following errors:

bm_error.JPG

bm_error1.JPG

This happens on both Chrome and Firefox.

The out-of-the box Basemap Gallery Widget works fine.

Any thoughts? Thanks, Meg

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Meg,

   OK I figured out why the initial basemap is not getting selected and added to the top of the widget. The name of the map and the the name of the layer that was chosen to be the basemap layer have to be the same. This image should help explain.

example.jpg

If they are not the same then you end up with the upper selected basemap not having an image and your other two available basemaps appearing below even though one of them is actually the selected basemap.

View solution in original post

19 Replies
RobertScheitlin__GISP
MVP Emeritus

Meg,

   Can you look in your browsers web console and show me what it says?

0 Kudos
MegPeterson
New Contributor III

webconsole.JPGThanks for the quick response, Robert.

Am I looking in the right area?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Meg,

   OK, Nothing there that can help. Can you attach your config_Enhanced Basemap Gallery.json

0 Kudos
MegPeterson
New Contributor III

Here it is:

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Meg,

   OK, wrong file. The one I need is [instal dir]\server\apps\[app#]\configs\eBasemapGallery\config_Enhanced Basemap Gallery.json

0 Kudos
MegPeterson
New Contributor III

more coffee needed....

RobertScheitlin__GISP
MVP Emeritus

Meg,

   OK, not sure why this happen but I have seen it in the otb BasemapGallery widget and thus mine as well. If you open the json file that you sent me there are some extra empty objects in the basemaps array that need to be deleted. Delete the comma on line 37 and everything from line 38 to 47. Then you should be good to go.

0 Kudos
MegPeterson
New Contributor III

Okay - got it! Thanks!

Seems to be working in both Chrome and Firefox. Should one of the two basemaps populate the top image on load though, or do you have to manually click a lower image to start the mashup?

bm1.JPG

In my perfect world, with only two basemaps in our application, there would be the ability to have them both participate in the mashup on launch, similar to how you had it set in the Flex Viewer widget.

Thanks again, Robert. Your contributions are invaluable.

bm2.JPG

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Meg,

   The thumbnail should absolutely appear on the first selected basemap. Can you check the web console now and see if it gives a clue? Unfortunately the widget is not configurable to start with a hybrid mashup.

0 Kudos