Giter Club home page Giter Club logo

esri / map-gallery-template-js Goto Github PK

View Code? Open in Web Editor NEW
36.0 43.0 27.0 5.7 MB

This Public Gallery template is designed for anyone who wants to showcase their ArcGIS Online maps, layers, and mobile apps in a dynamic web gallery.

Home Page: http://www.arcgis.com/home/item.html?id=34505d89a3b34be09b65b98938974390

License: Apache License 2.0

JavaScript 74.58% CSS 20.35% HTML 1.60% PHP 1.40% ASP.NET 2.07%
arcgis-online javascript gallery-template arcgis-api maps-gallery web-application configurable-apps

map-gallery-template-js's Introduction

map-gallery-template-js

This PublicGallery template is designed for anyone who wants to showcase their ArcGIS Online maps, layers, and mobile apps in a dynamic gallery. more info.

View it live

App

Features

The Public Maps Gallery (PMG) template is designed for anyone who wants to showcase their ArcGIS Online maps, layers, and mobile apps in a dynamic web gallery. The template allows you to control the content that fills the gallery using tools available in your ArcGIS Online account. This means that once you deploy a gallery, keeping gallery content up-to-date is as simple as sharing or un-sharing items in your ArcGIS Online group. The PMG template is also easily configurable. A complete list of features and enhancements is included with the template as is a quick start guide.

Instructions

  1. Download and unzip the .zip file or clone the repo.
  2. Web-enable the directory.
  3. Access the .html page.
  4. See the readme.html page for configuration options.

New to Github? Get started here.

Deploying

  1. To deploy this application, download the template from Portal/ArcGIS Online and unzip it.
  2. Copy the unzipped folder containing the web app template files, such as index.html, to your web server. You can rename the folder to change the URL through which users will access the application. By default the URL to the app will be http://<Your Web Server>/<app folder name>/index.html
  3. Change the sharing host, found in options.js inside the config folder for the application, to the sharing URL for ArcGIS Online or Portal. For ArcGIS Online users, keep the default value of www.arcgis.com or specify the name of your organization.
  • ArcGIS Online Example: "sharingurl": "https://" + “<your organization name>.maps.arcgis.com
  • Portal Example where arcgis is the name of the Web Adaptor: "sharingurl": "https://" + "webadaptor.domain.com/arcgis"
  1. If you are using Portal or a local install of the ArcGIS API for JavaScript, change all references to the ArcGIS API for JavaScript in index.html to refer to your local copy of the API. Search for the references containing "https://js.arcgis.com/3.22" and replace this portion of the reference with the url to your local install.
  • For example: "https://webadaptor.domain.com/arcgis/jsapi/jsapi" where arcgis is the name of your Web Adaptor.
  1. Copy a map or group ID from Portal/ArcGIS Online and replace the default web map ID in the application’s index.html page. You can now run the application on your web server or customize the application further.

Note: If your application edits features in a feature service, contains secure services or web maps that aren't shared publicly, or generate requests that exceed 200 characters, you may need to set up 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 the proxy. If you do not have an Internet connection, you will need to access and deploy the ArcGIS API for JavaScript documentation from developers.arcgis.com.

New to Github? Get started here.

Requirements

  • Notepad 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

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.

map-gallery-template-js's People

Contributors

alaframboise avatar ctlocalgovteam avatar driskull avatar geospatialem avatar

Stargazers

 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

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  avatar

map-gallery-template-js's Issues

Caching issue

Hello,

We are trying to re-deploy a local version of the app, however we are running into cache issues when we make changes to JavaScript files, in particular the:

  • css/common.css
  • javascript/common.js
  • nls/template.js

Has anyone else encountered this issue and/or know of a way that we can apply a method to refresh the content? We are unable to locate where the common.js and template.js are called into the page. Are the scripts being done so through the Esri JS?

filter type only work for one type

in the option.js file, there is a parameter called "filterType", but could only take one type at a time, what if, for example, wants to filter web maps and application.

Adding Print Button to map.html

I noticed there is a helperService defined in commonConfig.js for a printTask. Was there ever a plan to include a Print widget on the map page? Is this still a future possibility?
Thanks.

Proxy Help

Hi @driskull I believe you helped with me out with a proxy question on the pim template. I'm now testing my proxy with the map gallery and running into problems. Any suggestions would be much appreciated.

Here's what I've done so far.

  1. updated the option.js with the group id, proxy url, and sharing url.

  2. updated the common.js with my proxy url on line 286. I think I'm missing something else between lines 261 and 288, but I'm not exactly sure.

    //Check to see if the app is hosted or a portal. In those cases set the sharing url and the proxy. Otherwise use
    //the sharing url set it to arcgis.com. We know app is hosted (or portal) if it has /apps/ in the url
    //templates can be at /apps or /home/webmap/templates
    var appLocation = location.pathname.indexOf("/apps/");
    if (appLocation === -1) {
    appLocation = location.pathname.indexOf("/home/");
    }
    this._options.isOrg = false;
    if (this._options.sharingurl) { //sharing url specified
    this._options.mobilePortalUrl = 'arcgis:' + '//' + location.host;
    //sharing url set in config file so use default services
    } else if (appLocation !== -1) { //hosted or portal
    this._options.isOrg = true;
    var instance = location.pathname.substr(0, appLocation);
    this._options.sharingurl = location.protocol + "//" + location.host + instance;
    this._options.proxyurl = location.protocol + '//' + location.host + instance + "/sharing/proxy";
    this._options.mobilePortalUrl = 'arcgis:' + '//' + location.host;
    } else { //default to arcgis.com
    this._options.sharingurl = location.protocol + "//" + "www.arcgis.com";
    this._options.mobilePortalUrl = "arcgis://www.arcgis.com";
    }
    arcgisUtils.arcgisUrl = this._options.sharingurl + "/sharing/rest/content/items";
    this._options.portalurl = this._options.sharingurl;
    //Set the proxy. If the app is hosted use the default proxy.
    if (this._options.proxyurl) {
    config.defaults.io.proxyUrl = "http://my.url.com/DotNet/proxy.ashx"
    config.defaults.io.alwaysUseProxy = false;
    }

Support other click behaviors for gallery items

Hi Matt,
It would be nice if you could configure options when clicking on an item in the gallery app the same as when you click on the group. For example, when you're browsing the items in the Group view you get a few options when you click. The Gallery App should mimic or at least include the option to enable the same set of click options.

gallery app

Versus:

gallery app behavior

Thanks,
~Stephen

Should this work with a Web AppBuilder app hosted on AGOL?

Clicking the thumbmail of a Web AppBuilder app throws error 404. All other apps and web maps work fine. It is only a Web AppBuilder application that has this issue.

I just get HTTP Error 404.0 - Not Found

Here is my workflow. I created a Web Mapping Application using the web appbuilder on AGOL and shared it with my group. I can see the web appviewer in my template, but when I click on it, the resource can't be found. But if a web map is selected instead, it works just fine.

Login in public gallery doesn't work in IE11

I have customized the public gallery with succes. In Firefox and Chrome the template seem to work fine but not in Internet Explorer. After some investigation I found out that the template does work in IE when I do not need to log in. Whenever I do have to login, however, the template doesn't load and the ajax symbol 'loading maps' remains on the screen. I have tested this by changing the group ID (in the options.js) from one where there are login credentials are required to one where there are no credentials required. Any idea where the problem may be?

Only use geocoders... that allow placefinding?

On lines 1024-1027 of map.js, you redefine geocoders to only include those that allow placefinding. I'm not sure what "placefinding" is or if we can set it on our custom ArcGIS Server geolocators. I've checked the online help and found no such detail. So, what is "placefinding"?

Thanks.

Add support for Tags to configure the gallery

It would be fantastic if the gallery app could be configured using a tag rather than a group, that way we can list related content without having to create really complex sets of groups to cover all the different combinations of items that are related to each other.

New features

I am making a public map gallery using this template. I was wondering if it would be possible to integrate again the carousel feature which was included in the previous map gallery template. I want the user to switch between maps without going back home.

Would it also be possible to add a button on the map so that it brings the user back to the initial extent?

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.