POST
|
Please note that your posted link references to Administering ArcGIS Online hosted services and not Administering ArcGIS Server. Probably you need following endpoint http://server:port/arcgis/admin/services/[<folder>]/<serviceName.serviceType>/edit ArcGIS REST API
... View more
02-27-2015
02:14 AM
|
0
|
2
|
1151
|
POST
|
We are doing the same. If you are using Google Chrome or Opera, you can connect the Developer Tools (F12 / CTRL + SHIFT + I) to your local filesystem. After this point you have full access to all your js/css/html files from Developer Tools. If you make changes with the css property inspector, the changes are saved to the stylesheets instantly and you don't have to copy them everytime. JS-Debugging works great, you even can edit js code while debugging and you don't have to refresh the page anymore (except you are implementing new object-based functions). The js editor brings some simple kind of code completion. Since we detected this feature, we are only using this "IDE" to develop widgets. Workspaces - Persistent authoring in the DevTools - Google Chrome
... View more
02-27-2015
01:30 AM
|
0
|
0
|
744
|
POST
|
Hi, Create a new MapView and inherit from AGSMapView. Now you can Overwrite all 4 touch Functions, but do not forget to call them on super-instance. After you have created the class, change the class of your mapView in InterfaceBuilder / XCode from AGSMapView to your new created class. (see attachement)
//Header file
@interface TouchableMapView : AGSMapView {
...
}
//Mainfile
@implementation TouchableMapView
-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesBegan:touches withEvent:event];
......
}
-(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesMoved:touches withEvent:event];
.......
}
-(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesEnded:touches withEvent:event];
......
}
-(void) touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesCancelled:touches withEvent:event];
........
}
@end
If you only want to track endpanning and endzooming you can attach your observer-object like this: In this case "self" is an UIViewController which has function mapViewDidEndPanning:(NSNotification *) notification.
//Is called when map did end panning
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(mapViewDidEndPanning:) name:@"MapDidEndPanning" object:nil];
//is called when map did end zooming
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(mapViewDidEndPanning:) name:@"MapDidEndZooming" object:nil];
handler function:
-(void) mapViewDidEndPanning:(NSNotification *) notification
{
//Check name of notification:
if([[notification name] isEqualToString:@"MapDidEndZooming"])
{
...
}else{
...
}
}
... View more
08-26-2011
03:53 AM
|
0
|
0
|
349
|
POST
|
Thanks for the trick with antialiasing. By the way, same code works for me in (iPad-)simulator...
... View more
08-19-2011
12:31 AM
|
0
|
0
|
141
|
POST
|
Did anyone find out how to make an image without gridlines?
... View more
08-17-2011
06:58 AM
|
0
|
0
|
477
|
POST
|
Rotation of MapView can be implemented by setting mapView.transform = CGAffineTransformMakeRotation(alpha). This rotates the full mapView (including Callout, graphics...) on UIView-Base and can be hanged on your Compass with use of CLLocationManager. You can try my code in "ZüriPlan" - App available on App Store. PS: I block Interface rotation when Compass is active. Its a mess! Also deactivate Compass when Pushing your map away with NavigationController or if you leave MapView through TabViewController. Deactivate it when leaving the App or push the Standby button (AppDelegate Functions...) it's very Energy-hungry 😉 My Code: Interface: @Interface MapViewController:UIViewController<CLLocationManagerDelegate>
//CLLocationManagerDelegate provides functions to listen to Heading/GPS Change
{
....
CGRect originalMapViewFrame; // Save the current mapView Size here
IBOutlet AGSMapView *mapView; //your AGSMapView Reference...
CLLocationManager *locationManager; //locationManager Instance
...
}
//Serve your LocationManager as retained Property to manage your Memory correctly, don't forgett to release it in your dealloc-Funciton
@property(retain) CLLocationManager *locationManager;
@end Implementation: @implementation MapViewController
@synthesize locationManager; //generate property code
...
-(void) startHeading
{
//locationManager is an Object of Type CLLocationManager -> import CoreLocation
if (!self.locationManager) {
self.locationManager = [[[CLLocationManager alloc] init]autorelease];
self.locationManager.delegate = self;
}
// First: Backup current mapview Size. It will be restored on stopHeading
CGPoint origin = self.mapView.frame.origin;
CGSize size = self.mapView.frame.size;
originalMapViewFrame = CGRectMake(origin.x, origin.y, size.width, size.height);
//Blow up your map to a Square, this will hide white Areas when rotating your map
//The new size will be the diagonal length using Phytagoras...
CGFloat newWidth = floor(sqrt(pow(size.width, 2) + pow(size.height, 2)));
//Calculate new x and y origins
CGFloat x = origin.x - ((newWidth - size.width) /2);
CGFloat y = origin.y - ((newWidth - size.height) /2);
//Set the new Layoutinformation to your mapView
self.mapView.frame = CGRectMake(x, y, newWidth, newWidth);
//tell your LocationManager to start the updating
[self.locationManager startUpdatingHeading];
}
//Will be called from locationManager and updates every Heading Changed
-(void) locationManager: (CLLocationManager *)manager didUpdateHeading: (CLHeading *)newHeading
{
// Get your magneticHeading. If you need the "true" heading, use newHeading.trueHeading instead. But trueHeading only works, if GPS is enabled for your App and your Device is GPS ready...
float heading = newHeading.magneticHeading;
// You can use this block for smoother Rotation using a UIView Animation
[UIView beginAnimations:nil context:UIGraphicsGetCurrentContext()];
[UIView setAnimationCurve:UIViewAnimationCurveLinear];
[UIView setAnimationDuration:0.05];
//make some math (radial to degree or something...)
float rotation = -1.0f * M_PI * (heading) / 180.0f;
//Apply a rotation Transform to your map
self.mapView.transform = CGAffineTransformMakeRotation( rotation);
//Commit the animation
[UIView commitAnimations];
// if you need actual heading somewhere else, save it. otherwise you don't need this
self.heading = rotation;
}
//Stops heading
-(void) stopHeading
{
[self.locationManager stopUpdatingHeading];
//Remove Rotate Animation
self.mapView.transform = CGAffineTransformMakeRotation(0);
// Restore original Framedata for your mapView
self.mapView.frame = originalMapViewFrame;
}
@end
... View more
07-25-2011
02:09 AM
|
0
|
0
|
308
|
POST
|
if you make a spatial query with a MapPoint, this MapPoint must be in the Geometry you want to query. So you can try very long until you reach the correct location to query another MapPoint in your service 😉 1: You could use a IdentifyTask. There you can specify a tolerance for your MapPoint. But you can't specify a definitionquery, so sometimes you can't use this. 2: You can make an Envelope out of your MapPoint, Envelope e = new Envelope(); e.XMax = mappoint.x + 100; e.XMin = mappoint.x -100; e.YMax = mappoint.y + 100; e.YMin = mappoint.y - 100; and then specify this new envelope as querygeometry. not very nice, but works for points. 3: for polylines, try to set the spatialRelationship to Crosses or something other than Contains. I didn't try it but it should work on this way. hope it works
... View more
05-20-2010
09:16 AM
|
0
|
0
|
115
|
POST
|
The REST interface uses an other "Visibility Management" as the SOAP Interface. If you set the Visibility of a grouplayer to visibile (add the id to the list) all sublayers will be visible. To hide one sublayer, remove the grouplayer id and add each visible sublayer id. Background (0) [INDENT]VisibleLayer(1)[/INDENT] [INDENT]VisibleLayer(2)[/INDENT] [INDENT]InvisibleLayer(3)[/INDENT] If id 0 is in the VisibleLayers array, all sublayers are visible. So remove id 0 and add 1 and 2. Hope this helps
... View more
05-20-2010
06:36 AM
|
0
|
0
|
209
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|