Skip to content

Instantly share code, notes, and snippets.

View tomwayson's full-sized avatar
💭
Rockin' the dad jeans

Tom Wayson tomwayson

💭
Rockin' the dad jeans
View GitHub Profile
@tomwayson
tomwayson / index.html
Last active April 8, 2021 20:38
Access ArcGIS Online items using OAuthentication
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta
name="viewport"
content="initial-scale=1, maximum-scale=1,user-scalable=no"
/>
<title>Access ArcGIS Online items using @esri/arcgis-rest-auth</title>
@tomwayson
tomwayson / components.my-component.js
Created August 8, 2018 22:21
classNameBindings works w/ CPs
import Ember from 'ember';
export default Ember.Component.extend({
classNameBindings: ['redText'],
redText: Ember.computed.alias('isRed')
});
{
"$schema": "https://vega.github.io/schema/vega/v3.0.json",
"width": 500,
"height": 200,
"padding": 5,
"data": [
{
"name": "table",
"values": [
@tomwayson
tomwayson / angular2-esri-loader-angular-cli-instructions.md
Last active September 18, 2022 05:36 — forked from jwasilgeo/angular2-esri-loader instructions.md
How to use angular2-esri-loader in an angular-cli application

Adding angular2-esri-loader to the app and creating a map

NOTE: These instructions apply to trying to use the ArcGIS API for JavaScript in an Angular 2 application created w/ angular-cli. If you're working with more recent versions of Angular, you should use https://github.com/Esri/esri-loader instead.

  1. Create a new Angular app by using angular-cli to generate a new project

  2. Install angular2-esri-loader

npm install angular2-esri-loader esri-loader --save
@tomwayson
tomwayson / components.my-component.js
Created March 21, 2017 17:45 — forked from mjuniper/components.my-component.js
checked attribute binding
import Ember from 'ember';
export default Ember.Component.extend({
checked: Ember.computed('model.id', 'itemsToAdd.[]', function () {
const itemsToAdd = this.get('itemsToAdd');
return !!itemsToAdd.findBy('id', this.get('model.id'));
}),
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
init () {
// create a script object whose source points to the API
const script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://js.arcgis.com/4.2/';
import Ember from 'ember';
export default Ember.Controller.extend({
queryParams: ['appid'],
appName: 'Ember Twiddle',
init () {
console.log('appid', this.get('appid'));
}
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@tomwayson
tomwayson / hack.hbs
Last active April 20, 2016 23:41 — forked from dbouwman/hack.hbs
{{page-layout }}
{{#each layoutRow as |row|}}
{{layout-row style=row.style}}
{{cards-layout}}
{{/layout-row}}
{{/each}}
{{/page-layout}}
{{page-layout-editor }}
{{#each layoutRow as |row|}}