Giter Club home page Giter Club logo

map-tools-template's Introduction

ArcGIS Configurable Apps will be retired in 2025. The ArcGIS Configurable Apps source code repro is deprecated and will not receive further updates. In addition, this repository will be removed in October 2025, along with the October 2025 ArcGIS Online update.

Deprecated: map-tools-template

##Note: This app is retired and wil no longer be updated.

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

View it live

Getting Started

Review the following ArcGIS.com help topics for details on Templates:

Folders and Files

The template consists of the following folders and files:

/config/: A folder for your application's configuration files.

  • defaults.js: Define the default configuration information for the template. You can use this file to specify things like a default web map id, a proxy url, default services, a Bing maps key, default color theme and other template-specific settings.

/css/: Contains the CSS files for the application.

  • main.css This file contains the map styles that set the margin, padding and initial height (100%).

/images/: Contains images used by the application.

/js/: Contains 3 JavaScript files and 1 folder:

  • /nls/: The nls folder contains a file called resources.js that contains the strings used by the application. If the application needs to be supported by multiple locales you can create a folder for each locale and inside that folder add a resources.js file with the translated strings. See the resources.js file in the nls/fr folder for an example of this in French.
  • main.js: Creates the map based on configuration info. You will write all your main application logic in here.
  • template.js: Module that takes care of "template"-specific work like retrieving the application configuration settings by appid, getting the url parameters (web map id and appid), handling localization details and retrieving organization specific info if applicable. You will most likely not need to modify this file. Also sets the proxy and geometry service if the url's have been provided in the defaults.js file or are available from the org. Once executed you'll have access to an object that contains properties that give you access to the following:
    • Template specific properties
    • appid
    • webmap
    • helperServices: geometry, print, locator service urls
    • i18n: Strings and isRightToLeft property that can be used to determine if the application is being viewed from a language where text is read left-to-right like Hebrew or Arabic.
    • proxy url
  • templateOptions.js: Options file for configuring your template to query for specific resources and items. You can edit this file and your template can enable or disable querying for things such as localization files, ArcGIS group information, group items, custom url parameters, etc.

index.html: The default html file for the application.

/resources/: Contains helpful files for your application.

  • resources/configurationPanel.js Default configuration panel settings for the template. This is only applicable to configurable templates. This example will create a configuration panel with one dropdown list that contains three template color choices (seaside, chrome, pavement). When the templateConfig.js module retrieves any configurable settings you'll get the theme name back in a parameter named theme. Then you can apply the necessary css to your application to apply the new colors - like change the border color etc. See the Adding configurable parameters to templates help topic for more details.

Instructions

  1. Download and unzip the .zip file or clone the repository.
  2. Web-enable the directory.
  3. Access the .html page.
  4. Start writing your template!

New to Github? Get started here.

Requirements

  • Text or HTML editor.
  • A little background with JavaScript.
  • Experience with the ArcGIS JavaScript API would help.

Resources

Issues

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

Contributing

Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.

Licensing

Copyright 2013 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.

map-tools-template's People

Contributors

ecaldwell avatar jgravois avatar kellyhutchins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

map-tools-template's Issues

Update web map in Map Tools example

The web map in the Map Tools example should be updated with a map that better highlights the app and web mapping best practices. The first item is a major issue; the others are minor.

  • Major issue -- The Boston Marathon layer has random "null" polygons that should be removed and labels that conflict with the basemap (remove labels or change basemap).
  • The layer also should be symbolized using one of the numeric attributes and it's name changed to something like "Boston Marathon Registrations."
  • A second layer should be added to the map so that users can better see how the layer toggle tool works.
  • The published layer should have field aliases. The table shows database-style field names with underscores and abbreviations.

screen shot 2015-03-03 at 1 47 47 pm

Application does not load tools if credential is not provided for private layer

Hi Kelly. We found this week that this template will not fully load the UI and tools, and that there is likely an unhandled error when it loads a webmap with an authenticated secure layer. Here is a webmap for example with only a basemap and one unshared (owned by different user than owner of app and webmap) layer:

http://esrinortheast.maps.arcgis.com/apps/MapTools/index.html?webmap=3435d9bdcda6485a8cf3f8e749172e9c

Depending on browser and logged in state of ArcGIS Online you may or may not get prompted with the Identity Manager login screen. If you cancel, provide a credential without permissions to the secure layer, or don't receive a prompt at all (sometimes seeing this in Chrome Incognito), the tool UI never loads and it looks like there are some errors in the console.

Just wanted to report it. Let me know if you would like any additional information about the use case, etc.

Search option not looking into layers

I have set these in default.js
"search": true,
"locationSearch": false,
"searchExtent": true,
"searchLayers":{
"id": "LandUseCases4",//"Boston_Marathon_7694",
"fields": ["CASENAME", "CASESTATUS"] //"STATE_NAME"
},

but search is not being performed on the layer. I have set the locationsearch to false , should it not search on location then? but it does search on location

any documentation?

I am looking for documentation that says what can and canont be done with the template.
It says to open the html and that is it. These templates would be more useful if they provided instructions.
I see how you can have a layer list, table, etc. but that is it, nothing about how to actually alter the code if you want to set something up. and only one table? Please make a habit of providing instructions since most of these examples do not and its not only developers that would like to make map apps look nicer. thanks

Print task doesn't download PDF

I'm using this template with an ArcGIS for Portal 10.3 Web Map. The template is hosted on a web server (not within Portal for ArcGIS). The print task executes successfully using our internal Export Web Map Task - if I check response in the Chrome console, I can see the uri for the resultant pdf (ie, https://ourgisserver.domain.com/arcgis/rest/directories/arcgisoutput/Utilities/PrintingTools_GPServer/_ags_a9f6356224014f44bd08ed32495ff169.pdf).
However, the app doesn't automatically download the pdf. At some point in the JS, window.location would have to be set to the uri for the pdf but that doesn't seem to happen. Any suggestions?

Layer List Widget Open Automatically

Hello,

Out of the box, I do not believe this template has the capability to have a widget open upon app load. However, I have been playing around with the code and was wondering if someone could help me manipulate the code so that the layer list widget is open automatically upon app load?

Any help is appreciated!

what is the main difference

Thanks for doing this.... I had recently started with dojo... Got boilerplate way .. as this sample is based on boilerplate as base....but what is main difference between this sample and classic viewer

https://github.com/Esri/basic-viewer-template

implementing the same thing with different techniques.... or any difference if so then what is better technique..

Regards
Nauman

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.