Skip to content

Instantly share code, notes, and snippets.

View nixta's full-sized avatar

Nicholas Furness nixta

View GitHub Profile
@nixta
nixta / ArcGISMapDeets.html
Last active April 20, 2017 13:17
A bookmark to give you info on your current view of a map at ArcGIS.com.
<a href='javascript:void((function(){var m=false; if (typeof esri !== "undefined" && typeof esri.arcgisonline !== "undefined") {if (esri.arcgisonline.map.main.map !== null) {m=true;}}; if (m) {var a=esri.arcgisonline.map.main.map; var l=a.__LOD, c=a.extent.getCenter(); alert("Scale: " + l.scale + "\nLevel: " + l.level + "\nCenter: " + c.x + "," + c.y + "\nLat,Lon: " + c.getLatitude() + "," + c.getLongitude());} else {alert("Use this bookmark while viewing a map at ArcGIS.com!");}})());'>ArcGIS Map Deets</a>
@nixta
nixta / basemaps.h
Last active December 25, 2015 05:29
#defines for ArcGIS Online tiled basemap layers
#define kStreetURL @"http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"
#define kTopoURL @"http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"
#define kGreyURL @"http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer"
#define kGreyRefURL @"http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer"
#define kImageryUrl @"http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"
#define kImageryRefURL @"http://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer"
#define kNatGeoRefURL @"http://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer"
@nixta
nixta / Readme.md
Created October 17, 2013 18:16 — forked from ajturner/Readme.md

CSS styling with more styling and less hard-coded SVG.

Click on the legend to toggle highlights.

Needs to be cleaned up some more.

@nixta
nixta / NSObject+NFNotificationsProvider.h
Last active August 29, 2015 13:59
NSNotificationsProvider: Subscribe to multiple notifications on an object with one call.
#import <Foundation/Foundation.h>
#define strSelector(a) NSStringFromSelector(@selector(a))
@interface NSObject (NFNotificationsProvider)
-(void)registerListener:(id)listener forNotifications:(NSDictionary *)notificationSelectors;
-(void)unRegisterListener:(id)listener fromNotifications:(NSArray *)notificationNames;
@end
@nixta
nixta / README.md
Last active August 29, 2015 13:59
New Distance Query Parameter

Query by Distance

This sample shows the new ArcGIS Online query parameters "distance" and "unit" in action.

The search geometry is buffered by "distance" units.

We've long been able to search by complex criteria (custom polygons, closest features by road network, etc.) but now you can just provide a point and distance!!

Coming to ArcGIS Server at 10.3.

Keybase proof

I hereby claim:

  • I am nixta on github.
  • I am nixta (https://keybase.io/nixta) on keybase.
  • I have a public key whose fingerprint is CEBD 164E F980 F50E 495F 9C24 DACB C0F9 4EA3 32D7

To claim this, I am signing this object:

@nixta
nixta / AGSQueryTask.swift
Last active August 29, 2015 14:04
Translating a delegate model to a closures model. Put these files in the same Swift module.
//
// AGSQueryTask.swift
// swift-samples
//
// Created by Eric Ito on 7/28/14.
// Copyright (c) 2014 Esri. All rights reserved.
//
import ArcGIS
@nixta
nixta / Chrome Log
Last active August 29, 2015 14:04
addFeature() from geoservices-js
Remote Address:70.37.102.106:80
Request URL:http://services.arcgis.com/OfH668nDRN7tbJh0/arcgis/rest/services/Gnip/FeatureServer/0/addFeatures
Request Method:POST
Status Code:200 OK
Request Headersview source
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Cache-Control:max-age=0
Connection:keep-alive
@nixta
nixta / .htaccess
Last active March 19, 2024 22:52
.htaccess to add CORS to your website
# Add these three lines to CORSify your server for everyone.
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Methods "GET,PUT,POST,DELETE"
Header set Access-Control-Allow-Headers "Content-Type, Authorization"
@nixta
nixta / GetMapDetails.js
Last active August 29, 2015 14:10
Bookmarklets for the ArcGIS Online viewer
if (typeof arcgisonline !== 'undefined' && arcgisonline.map.main.map !== null) {
var m = arcgisonline.map.main.map,
c = m.extent.getCenter();
alert('Scale = 1 : ' + m.getScale() +
'\nZoom Level = ' + m.getZoom() +
'\nCenter = ' + c.x + ', ' + c.y +
'\nLat,Lon = ' + c.getLatitude() + ', ' + c.getLongitude());
} else {
alert('Use this bookmark while viewing a map at ArcGIS.com!');
}