Skip to content

Instantly share code, notes, and snippets.

View oevans's full-sized avatar

Owen Evans oevans

View GitHub Profile
@oevans
oevans / BannerNotification.js
Last active August 16, 2018 13:26 — forked from ssylvia/BannerNotification.js
Banner Notification
define([
// Import reusable strings as needed (e.g. dojo/i18n!./path/to/template.js)
], function(
// String Object (e.g. ViewerStrings)
) {
'use strict';
var existingNotifications = [];
var isUniqueNotification = function(id) {
if (existingNotifications.indexOf(id) >= 0) {
@oevans
oevans / index-snippet.html
Last active March 21, 2017 17:57
Story Map configOptions
<script type="text/javascript">
//---------------------------------
// Application configuration
//---------------------------------
var configOptions = {
// Enter an application ID created through the Cascade builder
appid: "a22c0c5113e64dd7b9fb6248e4b976c3",
// Optionally, to secure Cascade's access, if the story item is private or to use the builder
// configure an ArcGIS OAuth application ID (example: 6gyOg377fLUhUk6f)
// When specified, sign-in is mandatory even if your story is public
<head>
<style>
html, body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
background-color: #000;
}
</style>
@oevans
oevans / index.html
Last active August 31, 2015 16:43
World_Cities
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href=
"http://js.arcgis.com/3.14/esri/css/esri.css">
<link rel="stylesheet" type="text/css" href=
"https://rawgit.com/benheb/legend/master/legend.css">
@oevans
oevans / index.html
Created August 31, 2015 16:43
World_Cities
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href=
"http://js.arcgis.com/3.14/esri/css/esri.css">
<link rel="stylesheet" type="text/css" href=
"https://rawgit.com/benheb/legend/master/legend.css">
@oevans
oevans / webmap.json
Created August 31, 2015 16:43
World_Cities
{
"item": {
"title": "New Map",
"snippet": "World_Cities",
"extent": [
[
-178.46483813631698,
-73.4371172689712
],
[
@oevans
oevans / CrossfadingImagesHomePage.html
Created February 24, 2015 14:04
Use this HTML to configure a set of crossfading images for your ArcGIS Online home page. Update image paths (starting at line 148) and other animation properties as desired. Go to My Organization > Edit Settings > Home Page > Banner > Custom Design > click View HTML Source button in the text editing toolbar > paste your modified code into the te…
<style>
#cf {
position:relative;
margin:0 auto;
}
#cf img {
position:absolute;
left:0;
}

How to migrate web maps using the beta version of the Dark Canvas Basemap to the production services

Download this script and run it twice from a command line as indicated below to migrate both the reference and base layers of the basemap.

python updateWebmapServices.py https://www.arcgis.com [ADMIN-USERNAME] [PASSWORD] [SEARCH-QUERY] http://tiles.arcgis.com/tiles/P3ePLMYs2RVChkJx/arcgis/rest/services/World_Dark_Gray_Reference_Beta/MapServer http://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Dark_Gray_Reference/MapServer

python updateWebmapServices.py https://www.arcgis.com [ADMIN-USERNAME] [PASSWORD] [SEARCH-QUERY] http://tiles.arcgis.com/tiles/P3ePLMYs2RVChkJx/arcgis/rest/services/World_Dark_Gray_Base_Beta/MapServer http://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Dark_Gray_Base/MapServer
@oevans
oevans / ChangeMapSelectionColor
Last active August 29, 2015 14:06
Change map selection color in app templates
/* Side Accordion template
Add map2_graphics_layer, map3_graphics_layer, etc. as needded for additional maps*/
<style type="text/css">
#map0_graphics_layer path, #map1_graphics_layer path {
stroke: #b22222 !important;
}
</style>
/* Text and Legend template
@oevans
oevans / Enterprise Login Final Migration Instructions.md
Last active August 29, 2015 13:56
Instructions to complete migration to Esri Enterprise Login

Things to know before migration:

  • Any layers/maps you have shared from Excel will no longer be able to be updated. They will continue to exist in their current form, but if they need to be updated they must be republished (and then any related maps/apps must be updated).
  • Testing indicates that hosted layers shared from Desktop can be accessed and updated ("overwritten") from your new enterprise login account.
  • Still investigating...which Esri Apps (e.g., Community Analyst, Collector, Ops Dashboard, etc.) support enterprise logins?

Actions needed to complete migration:

  1. Spot check your items and groups and let the admin (Owen) know if things look good.