Skip to content

Instantly share code, notes, and snippets.

View phpmaps's full-sized avatar
💭
Lending a helping hand on the web.

Doug Carroll phpmaps

💭
Lending a helping hand on the web.
View GitHub Profile
@phpmaps
phpmaps / routes
Created August 27, 2015 20:16
routes w/ maps
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Basemap Test</title>
<link rel="stylesheet" href="//js.arcgis.com/3.14/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="//js.arcgis.com/3.14/esri/css/esri.css">
<style>
html,body,#map {
height: 100%;
padding: 0;
margin: 0;
}
@phpmaps
phpmaps / local jsapi requirejs
Created August 27, 2015 21:27
local jsapi require JS
<!DOCTYPE html>
<html>
<head>
<title>Sample using RequireJS with ArcGIS JS API</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<meta http-equiv='content-type' content='text/html; charset=utf-8' />
<meta name='viewport' content='initial-scale=1.0 maximum-scale=1.0'>
<link href="http://js.arcgis.com/3.13/esri/css/esri.css" rel="stylesheet">
<style>
html, body, #map {
@phpmaps
phpmaps / directions
Created March 16, 2014 18:44
Direction events (get input values and direction results)
<!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>Directions Widget</title>
<link rel="stylesheet"
href="http://js.arcgis.com/3.8/js/dojo/dijit/themes/claro/claro.css">
<link rel="stylesheet"
@phpmaps
phpmaps / web_map_security
Created April 10, 2014 16:26
Web Map Security
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Web Map</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<style>
html,body,#map {
height: 100%;
//The featureLayer should be at a global scope
function onVote(graphic) {
var votes = graphic.Votes;
votes = votes + 1;
var attributes = graphic.attributes;
attributes.Votes = votes;
var newGraphic = new Graphic(graphic.geometry, graphic.symbol, attributes);
featureLayer.applyEdits([graphic],null,null);
}
<html>
<head><title>Event Test</title>
<script>
function clickHandle(arg){
alert("test event!");
}
</script>
</head>
<body>
<span id="target-id" onclick="clickHandle(this);">Click me!</>
@phpmaps
phpmaps / token
Created June 11, 2014 17:15
Create ArcGIS Server Token
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Make-a-token</title>
<link href=
"http://js.arcgis.com/3.6/js/dojo/dijit/themes/nihilo/nihilo.css" rel=
@phpmaps
phpmaps / print
Created June 12, 2014 01:42
printing esri map
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title></title>
<link rel="stylesheet" href="http://js.arcgis.com/3.9/js/dojo/dijit/themes/tundra/tundra.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.9/js/esri/css/esri.css">
<style>
html, body { height: 100%; width: 100%; margin: 0; padding: 0; }
@phpmaps
phpmaps / SVG-CSS
Created July 1, 2014 15:49
SVG w/ CSS on Feature Layer
<!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>SVG PictureMarkerSymbol</title>
<link rel="stylesheet" type="text/css" href="//js.arcgis.com/3.9/js/esri/css/esri.css"/>
<style>
html, body, #map {padding:0; margin:0; width:100%; height:100%;}
//
// ViewController.m
// Edit
//
// Created by Doug Carroll on 7/9/14.
// Copyright (c) 2014 Doug Carroll. All rights reserved.
//
#import "ViewController.h"