This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is an Esri Arcade expression for labeling features or map pop-ups that combines various road street name component fields into a single value. | |
// It tests for empty values in the record. If the value is empty, it returns an empty string (''). | |
// If the value is not empty, it returns the value of the record. | |
// See https://developers.arcgis.com/arcade/ for more information on Arcade | |
// See https://www.nena.org/page/NG911GISDataModel for more information on NENA NextGen911 data model | |
// Example road: North Main Street | |
// variable to hold the contents of the label for roads | |
var road_label = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this represents with "custom-scripts.js" file located within the "app" directory of appliation files | |
define(["dojo/topic"], function(topic) { | |
/* | |
* Custom Javascript to be executed while the application is initializing goes here | |
*/ | |
// The application is ready | |
topic.subscribe("tpl-ready", function(){ | |
/* | |
* Custom Javascript to be executed when the application is ready goes here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(["dojo/topic"], function(topic) { | |
// default alt text to apply to images | |
const defaultAltText = 'a view along the Yellow Breeches Creek'; | |
// function to set alt attribute for images | |
function setAltText(title,img) { | |
// use grouped text if slide title text exists | |
if (title) { | |
// grouped text | |
const groupedAltText = "".concat(defaultAltText, "; map tour stop: ").concat(title); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(["dojo/topic"], function(topic) { | |
// default alt text to apply to images | |
const defaultAltText = 'a view along the Yellow Breeches Creek'; | |
// function to set alt attribute for images | |
function setAltText(title,img) { | |
// use grouped text if slide title text exists | |
if (title) { | |
// grouped text | |
const groupedAltText = `${defaultAltText}; map tour stop: ${title}`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --------------------------------------------------------------------------- | |
# Name: Loop Through Layer "A" and Clip Features from Layer "B" | |
# | |
# Author: Patrick McKinney, Cumberland County GIS ([email protected] or [email protected]) | |
# | |
# Created on: 6/21/2019 | |
# | |
# Description: This sample script provides a template for how to loop through a layer (A) and clip features | |
# from another layer (B) based upon each record in layer A. | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// function to handle load event for map services | |
// See API reference at https://esri.github.io/esri-leaflet/api-reference/services/service.html#events | |
function processLoadEvent(service) { | |
// service request success event | |
service.on('requestsuccess', function(e) { | |
// set isLoaded property to true | |
service.options.isLoaded = true; | |
}); | |
// request error event |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 1. Post File [2018-09-30-Sample-Post.md] --> | |
--- | |
layout: post | |
title: A Sample Post | |
date: 2018-09-30 | |
author: Mike the Blogger | |
description: This is the one blog post to rule them all | |
featured-image: my-awesome-photo.jpg | |
featured-image-alt: Mike the Blogger speaking at Times Square, New York City, New York | |
categories: Side Hustle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sample script to start/stop ArcGIS Server service | |
# import modules | |
import arcpy, os, sys, time, datetime, urllib, urllib2, json | |
# generate token for server | |
def gentoken(server, port, adminUser, adminPass, expiration=60): | |
# Re-usable function to get a token required for Admin changes | |
query_dict = {'username': adminUser, | |
'password': adminPass, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#------------------------------------------------------------------------------- | |
# Name: Lesson 24 - Working With Multiple Maps In A Directory, | |
# Geospatial Programming | |
# | |
# Author: Patrick McKinney, Harrisburg Area Community College | |
# | |
# Created: 6/13/17 | |
# | |
# Description: sample script for looping through a folder (directory) | |
# and listing broken data sources in each map document (.mxd) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this is the file where the logic for your custom tool goes | |
# import modules | |
# import errorLogger.py module | |
import arcpy, sys, errorLogger | |
# run your tool's code | |
try: | |
pass | |
# your code goes here | |
# If an error occurs running geoprocessing tool(s) capture error and write message |