Skip to content

Instantly share code, notes, and snippets.

View nixta's full-sized avatar

Nicholas Furness nixta

View GitHub Profile
@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 / 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!');
}
@nixta
nixta / webmap.json
Created November 19, 2015 00:01
DC Parks
{
"item": {
"title": "New Map",
"snippet": "DC Parks",
"extent": [
[
-151.31757812495937,
-12.432019913106776
],
[
@nixta
nixta / index.html
Last active November 27, 2015 21:57
Example Webmap
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href=
"http://js.arcgis.com/3.14/esri/css/esri.css">
<link rel="stylesheet" type="text/css" href=
"https://rawgit.com/benheb/legend/master/legend.css">
@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.