GithubHelp home page GithubHelp logo

coomsie / locallayerwidget Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cmndrbensisko/locallayer

0.0 2.0 0.0 73 KB

The LocalLayer Widget for ArcGIS Web AppBuilder is intended to allow the direct addition of ArcGIS for Server Mapservices to be added directly to an ArcGIS Web AppBuilder application, without needing to wrap the desired services in an ArcGIS Online/Portal Web Map.

License: MIT License

JavaScript 93.42% CSS 6.58%

locallayerwidget's Introduction

LocalLayerWidget 1.0

The LocalLayer Widget for ArcGIS Web AppBuilder is intended to allow the direct addition of ArcGIS for Server Mapservices to be added directly to an ArcGIS Web AppBuilder application, without needing to wrap the desired services in an ArcGIS Online/Portal Web Map.

Under the Settings option in the Builder, add a JSON array containing the names and URLs of the MapServices that you want included in your Application.

Example:

	[
		{
			"name": "Parks",
			"url":"http://serverName/arcgis/rest/services/Parks/MapServer"
		},{
			"name": "Public Libraries",
			"url": "http://serverName/arcgis/rest/services/Libraries/MapServer"
		}
	]

Specify proxy settings if necessary by checking the "Use Proxy?" box, and specify 1) The domain name for which the proxy should be applied (ie. your in the example below), and 2) The URL of the proxy.ashx page itself.

Please note that this is not an in-panel widget. To add it to your ArcGIS Web AppBuilder, add the widget to your \client\stemapp\widgets directory, and add a reference to the widget in the standard default2Dapp configuration located at \client\builder\predefined-apps\default2DApp\config.json, under the widgetOnScreen section.

Example:

	"widgetOnScreen": {
		"widgets": [{
			{
				"uri": "widgets/LocalLayerWidget/Widget"
      		},
      	...
      	]}
	}

IMPORTANT: A minor change will need to be made to your \client\stemapp\jimu.js\LayerInfos\LayerInfoForMapService.js file to make this tool operational. Line 433 should be changed from:

var url = this.originOperLayer.url + '/' + subId;

To:

var url = this.originOperLayer.layerObject.url + '/' + subId;

The LayerList and AttributeTable widgets should continue to work with your local layers. The current click-to-identify functionality in the Web App Builder is driven by ArcGIS Online and Portal, so it won't currently work with this tool, unfortunately. Maybe an advanced identify widget can be created by some enterprising developers in the future!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.