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
#import "ViewController.h" | |
#import <ArcGIS/ArcGIS.h> | |
#define kSimulatedMetersPerSecond 2 | |
@interface ViewController () <AGSRouteTaskDelegate> | |
@property (nonatomic, strong) AGSRouteTaskParameters *defaultParams; | |
@property (nonatomic, strong) AGSRouteTask *routeTask; | |
@property (weak, nonatomic) IBOutlet AGSMapView *mapView; |
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
// | |
// AGSLocator+suggestionSwizzle.swift | |
// SuggestTest | |
// | |
// Created by Nicholas Furness on 8/17/16. | |
// Copyright © 2016 Esri. All rights reserved. | |
// | |
import ArcGIS |
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([ | |
"esri/views/ui/UI" | |
], function(UI) { | |
var extension = { | |
hide: function() { | |
_setUIVisible(this, false); | |
}, | |
show: function() { | |
_setUIVisible(this, true); | |
} |
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
// | |
// ViewController.swift | |
// WalkTimeTest-Swift | |
// | |
// Created by Nicholas Furness on 7/11/16. | |
// Copyright © 2016 Esri. All rights reserved. | |
// | |
import UIKit | |
import ArcGIS |
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
// | |
// AGSSingleFingerZoomGestureRecognizer.swift | |
// | |
// Created by Nicholas Furness on 6/17/16. | |
// Copyright © 2016 Esri. All rights reserved. | |
// | |
import Foundation | |
import ArcGIS |
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
- (void)clickedonPoint { | |
self.m_mapView.touchDelegate = self; | |
self.m_sketchLayer.geometry = [[AGSMutablePoint alloc] initWithSpatialReference:self.m_mapView.spatialReference]; | |
// Not sure why you have a sketchLayer here. | |
// However, if you do have one, you need to set the mapView's touchDelegate to the sketch layer. | |
// See https://developers.arcgis.com/ios/swift/guide/sketch-layer.htm#GUID-4CF8925A-B8B9-4656-AE3D-51DD126234CA | |
} | |
-(void)mapView:(AGSMapView *)mapView didClickAtPoint:(CGPoint)screen mapPoint:(AGSPoint *)mappoint features:(NSDictionary *)features { |
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
<!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"> |
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
{ | |
"item": { | |
"title": "New Map", | |
"snippet": "DC Parks", | |
"extent": [ | |
[ | |
-151.31757812495937, | |
-12.432019913106776 | |
], | |
[ |
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
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!'); | |
} |
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
# 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" |