Skip to content

Instantly share code, notes, and snippets.

View oevans's full-sized avatar

Owen Evans oevans

View GitHub Profile
@oevans
oevans / gist:5568576
Last active December 17, 2015 06:49
To remove the “Make a Map” and “ArcGIS for developers” sections of your organization's home page: 1) Go to My Organization > Edit Settings > Home Page tab, 2) In the Banner section, choose the "HTML" radio button and click the "View HTML Source" button (the last button on the Banner box's toolbar), 3) Paste the HTML code below into the text fiel…
<style>#bottomSection, #topSection { display:none; }</style>
@oevans
oevans / gist:5568591
Last active December 17, 2015 06:49
To change the font color for the featured maps' titles on your ArcGIS organization's home page: 1) Go to My Organization > Edit Settings > Home Page tab, 2) In the Banner section, choose the "HTML" radio button and click the "View HTML Source" button (the last button on the Banner box's toolbar), 3) Paste the HTML code below into the text field …
<style>
.galleryNode .galleryLabelContainer {
color: #333 !important;
}
</style>
@oevans
oevans / gist:5568595
Last active April 30, 2018 21:10
To round the corners on the banner image of your ArcGIS organization's home page: 1) Go to My Organization > Edit Settings > Home Page tab, 2) In the Banner section, choose the "HTML" radio button and click the "View HTML Source" button (the last button on the Banner box's toolbar), 3) Paste the HTML code below into the text field after/below th…
<div style="width: 960px;
height: 470px;
background: url(http://downloads2.esri.com/agol/org/samples/graphics/esri-q.jpg);
-webkit-border-radius:0 0 10px 10px;
-moz-border-radius:0 0 10px 10px;
-o-border-radius:0 0 10px 10px;
border-radius:0 0 10px 10px">
</div>
/*
@oevans
oevans / 3_GetAttachments.py
Created June 10, 2013 20:17
Step 2 - Get attachments
import os, urllib, urllib2, simplejson as json
cwd = os.getcwd()
### Generate Token ###
gtUrl = 'https://www.arcgis.com/sharing/rest/generateToken'
gtValues = {'username' : 'username',
'password' : 'password',
'referer' : 'http://www.arcgis.com',
'f' : 'json' }
@oevans
oevans / 4_CreateFeatures.py
Created June 10, 2013 20:18
Step 4 - Create features.
import arcpy, datetime, os, simplejson as json
cwd = os.getcwd()
### Load JSON File ###
with open('damageassessmentservice.json') as data_file:
data = json.load(data_file)
### Create Features ###
rows = arcpy.InsertCursor(cwd + '/data.gdb/Damage_Assessment')
@oevans
oevans / 5_AddAttachments.py
Created June 10, 2013 20:18
Step 5 - Add attachments
import arcpy, os, simplejson as json
cwd = os.getcwd()
### Load JSON File ###
with open('damageassessmentservice.json') as data_file:
data = json.load(data_file)
### Create Match Table ###
rows = arcpy.InsertCursor(cwd + '/data.gdb/MatchTable')
@oevans
oevans / gist:5902334
Last active December 19, 2015 05:09
Configuring app templates for use with Portal for ArcGIS: Changes to HEADER section
<!-- Replace these lines -->
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.2/js/esri/css/esri.css" />
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.2/js/dojo/dijit/themes/claro/claro.css">
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.2"></script>
<!-- With these lines -->
@oevans
oevans / index.html
Last active December 19, 2015 05:09
Sample story map template index.html file showing configuration changes needed so that it can be used with Portal for ArcGIS.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
<head>
<title>Shortlist</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7, IE=9">
@oevans
oevans / gist:5902621
Last active December 19, 2015 05:09
Configuring app templates for use with Portal for ArcGIS: Changes to CONFIG section
/*In the config section, add the following line above the existing code */
var SHARINGURL = "http://<YOUR WEB SERVER NAME HERE>/sharing/content/items" ;
@oevans
oevans / gist:5902645
Last active December 19, 2015 05:09
Configuring app templates for use with Portal for ArcGIS: Changes to init() function
function init() {
if (!_jqueryReady) return;
if (!_dojoReady) return;
esri.arcgis.utils.arcgisUrl = SHARINGURL; // ***ADD THIS LINE***
if (getParameterByName("webmap") != "") {
WEBMAP_ID = getParameterByName("webmap");
}