Local Layer Widget not showing Feature Layer on map?

5763
16
Jump to solution
04-26-2016 06:43 AM
BrettKruger
New Contributor II

Hey guys

So we are trying to create a map here using the Local Layer widget from here : GitHub - cmndrbensisko/LocalLayer: The LocalLayer Widget for ArcGIS Web AppBuilder is intended to al...

Our map basically needs the functionality which this widget offers, that is to create a map and feed it of ONLY map services without the need to install online/portal.

Has anyone used this widget and can guide me to why it would not show my feature layer?

I started using this widget on webapp builder version 2.0 but thought perhaps that is too new and switched over to v1.3 and I did change my WAB settings as stated in the readup there.

Any thoughts?

Thanks a lot.

Brett Kruger

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Brett,

  The fact that the widget is showing in the box below the scalebar, zoom slider, search, etc and up there with those shows me that you have not added the widget to the proper location in the config.json. Can you zip and attach your config.json for me to review?

View solution in original post

16 Replies
RobertScheitlin__GISP
MVP Emeritus

Brett,

  This widget does allow for adding local services to your map but WAB still requires you to begin with a Web Map from AGOL, your organizations AGOL account or your local Portal (just FYI). The widget is pretty straight forward you follow the install instructions on the github download page and then use the widgets settings UI to add and configure your local layers.

0 Kudos
BrettKruger
New Contributor II

Hi Robert

Thanks for the reply.

Sorry I should have mentioned that I did indeed create the map via AGOL. 

It does seem very straight forward as you mention but for some reason my feature service which consists of point data is not showing on my map.

Does the version make a difference here from WAB 1.3 to v2.0? Anything specific I could investigate to see why its not showing? 

Ps Robert youre custom widgets are brilliant.

Sent from my Samsung device

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Brett,

  The latest release that Adam has on the GitHub site is named 1.3.1, but is has been tested and works fine in WAB 2.0. What type of layer are you adding this point data as (i.e. add FeatureLayer or add Dynamic)?

0 Kudos
BrettKruger
New Contributor II

Robert,

Ok so that is fine if I was using v2.0. Ive been adding it as a feature layer. The map service url that I provide to it has been published as a feature service.

Sent from my Samsung device

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Brett,

  OK I don't see a reason that this would not work if you are using the full url to your FeatureLayer (i.e http://gis.calhouncounty.org/arcgis/rest/services/Symbols/MapServer/2​ FeatureServer would be fine too.)

0 Kudos
BrettKruger
New Contributor II

Hi Robert

I have been working with this widget the whole day and still cannot get this to work…

I even started a new default map in a new webapp builder and went through the github page to go do all the settings yet again, still no luck with this. Does anyone have a working example I can look at? I want to see what this widget looks like when it works as in my chrome browser I get a whole lot of errors for some reason.

I am attaching the picture where its just a basic map with the default services loaded that comes with the widget as if I had to load my service or the default results are the same.

Kind Regards

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Brett,

  I see that you are not understanding how this widget is to be manually added to the config.json like the readme.md is instructing.

Setting up the Widget

:bulb: Please note that this is not an in-panel widget.

WebAppBuilder 1.3 Steps:

To add this widget to your ArcGIS Web AppBuilder 1.2 environment, add the widget to your \client\stemapp\widgets directory, and add a reference to the widget in the standard Default configuration located at \client\stemapp\predefined-apps\default\config.json, under the widgetOnScreen section.

If you plan to use the Local Layer widget with the other predefined apps like basic_viewer, editor, or simple_map_viewer then just repeat the above step in those folders.

Example: "widgetOnScreen": { "widgets": [ { "uri": "widgets/LocalLayer/Widget", "visible": false }, ... ] }

So note that these install direction say WAB 1.2 and 1.3 but the procedure is the same for WAB 2.0

So for example I have WAB2.0 installed on my C:/

I would open this file:

C:\WebAppBuilder2.0\client\stemapp\predefined-apps\default\config.json

I would add the lines indicated in the above example and I would look like this:

(the lines added are 21 thru 24 below).

{
  "theme": {
    "name": "FoldableTheme",
    "styles": ["default", "black", "blue", "cyan", "green", "purple", "red", "yellow"],
    "version": "2.0.1"
  },
  "portalUrl": "",
  "appId": "",
  "authorizedCrossOriginDomains": [],
  "title": "ArcGIS Web Application",
  "subtitle": "with Web AppBuilder for ArcGIS",
  "keepAppState": true,
  "logo": "images/app-logo.png",

  "geometryService": "",

  "links": [],

  "widgetOnScreen": {
    "widgets": [
    {
      "uri": "widgets/LocalLayer/Widget",
      "visible": false
    }, {
      "uri": "themes/FoldableTheme/widgets/HeaderController/Widget",
      "position": {
        "left": 0,
        "top": 0,
        "right": 0,
        "height": 40,
        "relativeTo": "browser"
      },
      "version": "2.0.1"
    }, {
....
0 Kudos
BrettKruger
New Contributor II

HI Robert

I have followed the instructions on how to add the widget manually. I am sure I am doing it right (I mean it seems simple enough), but as soon as I have a blank map and add a feature service to the widget it has no layers that it adds to the map.

To put it short what I am trying to do is to use our map services from our ArcGIS server and consume these services straight into the WAB instead of consuming these services through AGOL.

We would like to make use rather of our ArcGIS server instead of having to go through ArcGIS online all the time. Creating the map on WAB is still fine.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Brett,

  I am not 100% sure what is happening on your end but I want to be sure you understand that the LL widget does not remove the WAB built-in need to access your portal. There are many portions of the WAB stemapp that call on portal for different reasons (i.e. what is your portals default basemap, print service, geocoder, map extent, etc). You need to have a web map from AGOL or your portal as the starting point of your WAB app. That web map will set the maps Spatial Reference and LODs. the the LL widget can completely overwrite all the layers in the web map and use your servers map services.

but as soon as I have a blank map

How are you achieving this?

0 Kudos