Git Product home page Git Product logo

viewer's Introduction


forked from https://github.com/mgleahy/Viewer, that forked Esri\Viewer. 99.99% of the credit goes to them

Includes a simple draw tool a logic for adding it and a custom search tool in the Draw tool version.

Additional cofigurations were made to use a non ArcGIS Online map service resource.


A slightly modified version of the Esri Basic Viewer that allows a custom AMD module to be plugged in and have it appear as one of the panels.

Screen Shot

In the index.html, a custom event emitted by the app class called 'found-custom-tool' can be connected to, which will be triggered for any items in the 'tools' list in defaults.js that has a name that does not match any of the default Viewer tools. This event includes references to the config for the tool (the item specified the tools list in defaults.js), the current array of tools used by the toolbar, and the toolbar object itself. These are sufficient for a custom module to add itself to the list of tools by calling the toolbar.createTool(toolConfig,panelSize) function inside of a method that returns a promise object (toolConfig = the object from the list of tools in defaults.js, and panelSize = "large", "medium" or "small"). The toolbar.createTool() method returns the domNode of the content panel that is displayed when the tool is selected - this is where your custom module can display it's controls/content.

If your tool needs to interact with or add content to the map, you can use the map propety of the toolbar object (as it is returned by the found-custom-tool event).

basic-viewer-template

Basic Viewer is a configurable application template used to display a web map with a specified set of commonly used tools and options.

Screen Shot

[View it live] (http://www.arcgis.com/apps/Viewer/index.html?webmap=f5b13dbed07c46cdb783cf361833aa6b)

#Features The template can be configured using the following options:

  • Map: Choose the web map used in your application.
  • Color Scheme: Choose a color scheme for the application.
  • Show Title: Choose whether to include an application title.
  • Title Text: The application title. The default title is the web map name.
  • Logo: Choose a custom logo for your application.
  • Overview Map: Display a retractable overview map to add context for panning and zooming.
  • Legend: Display a legend for map layers. *
  • Details: Display the web map item description. *
  • Editor: Allows users to interactively create, modify, or delete features in editable layers. *
  • Print: Enables printing the map at the current extent. It can be configured to include a legend and supports different layout options.
  • Layer List: Enables toggling the visibility of operational layers within the web map. *
  • Basemaps: Enables the display of the basemap gallery.
  • Bookmarks: Enables the use of web map bookmarks for navigation. *
  • Measure: Enables measure tool for interactive area, length, and point measurement.
  • Share: Allows users to share the application with others via email, Twitter, or Facebook.
  • Search: Displays the Search box to enable navigation to addresses and places.

*These options will appear in the application when the web map has properties or layers that support them.

#Instructions

  1. Download and unzip the .zip file or clone the repo.
  2. Web-enable the directory.
  3. Access the .html page in a browser

Note: If your application edits features in a feature service, contains secure services or web maps that aren't shared publicly or generates requests that exceed 200 characters you may need to setup and use a proxy page. Common situations where you may exceed the URL length are using complex polygons as input to a task or specifying a spatial reference using well-known text (WKT). For details on installing and configuring a proxy page see Using a proxy page.

For addtional customization options view the wiki.

#Requirements

  • Notepad or HTML editor
  • Some background with HTML, CSS and JavaScript
  • Experience with the ArcGIS API for JavaScript is helpful.

#Resources

#Issues Found a bug or want to request a new feature? Please let us know by submitting an issue.

#Contributing Anyone and everyone is welcome to contribute.

#Licensing

Copyright 2012 Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

A copy of the license is available in the repository's license.txt file. [](Esri Tags: ArcGIS Online Web Application Templates) [](Esri Language: JavaScript)

viewer's People

Contributors

kellyhutchins avatar robodonut avatar gbonynge avatar jgravois avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

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.