|
POST
|
Dear All, I am generating a token for the FeatureService in my ArcGIS online services and using the same token to access the Feature Layers in my FeatureService but I am having invalid token error. Does anyone know that the token for feature layers is different from the parent featureservice (one which ends with '/FeatureServer') or not? Thanks a lot
... View more
09-04-2013
06:52 PM
|
0
|
0
|
765
|
|
POST
|
Now I am generating a token for the FeatureService in my ArcGIS online services and using the same token to access the Feature Layers in my FeatureService but I am having invalid token error. Do youknow that the token for feature layers is different from the parent featureservice (one which ends with '/FeatureServer') or not?
... View more
09-04-2013
06:50 PM
|
0
|
0
|
868
|
|
POST
|
Dear All, I am generating a token for the FeatureService in my ArcGIS online services and using the same token to access the Feature Layers in my FeatureService but I am having invalid token error. Does anyone know that the token for feature layers is different from the parent featureservice (one which ends with '/FeatureServer') or not? Thanks a lot
... View more
09-04-2013
06:49 PM
|
0
|
1
|
2466
|
|
POST
|
Can you tell me how do you trim the url and how do you access to the home level of the service? I haven't tested similar case but it should work if you keep the token defined in every request. If you access to layers (webmap) via Document, remember to set Token property. If you are accessing to layer via Layer (ie. dynamic), make sure that Token gets set. If you are accessing via custom http call using ArcGISWebClient it doesn't automatically activate IdentityManger so it should be activated before using it. If you are accessing to layer via custom http call, remember to keep ?token=<token> defined. But if you tell how you access to the home level of the service, maybe I can give better pointers. Hi, thanks a lot for your reply. I really appreciate that 🙂 What I am doing is something like this 1. I present a dialog box in which I get user id and password for ArcGIS online 2. I use GetItemsAsync() function to get all the portal items Urls, secure and non secure both under that user's name. 3. I send one Url out of many to another function which removes the last two parts of the Url so that the Url ends with only '/services' e.g http://xxxxx/arcgis/rest/services/US_Map/FeatureService to http://xxxxx/arcgis/rest/services 4. I perform JSON query on the resulting Url and create a tree like view in XAML. with the names and the URLs of the service. Then If a user clicks on one of the names. It creates a layer using the URL and then projects the layer on to the map. However when I perform Json query on the services Url aka http://xxxxx/arcgis/rest/services I only get the public services in response. I donot know how to incorporate token into the services home directory url so that I can see the private services as well. I will be grateful if you can shed some light on it.
... View more
09-04-2013
12:57 AM
|
0
|
0
|
868
|
|
POST
|
Hi Everyone, I want to know that when I access the services directory of ARCGIS online of my organization, I get in response only those services which are public. I want to access the services directory which will show me the services which are private as well. Is it possible? The method I am using right now is that I use IdentityManager to get the credentials of the user and then I use the credentials to GetItemsAsync() in order to get the items of the user public or private. But when I trim the url of the item to get to the Home directory of service and when I send the home directory of the services to json I get in response only the public services. Thanks and Regards
... View more
09-03-2013
09:38 PM
|
0
|
6
|
1126
|
|
POST
|
Hi, Can we access ArcGIS online via WPF like we can do in ArcGIS for iOS ? ArcGIS for iOS has AGSPortal class to access and use layers hosted on ARcGIS online. I wonder if ArcGIS for WPF has the same capability. Thanks Humza
... View more
08-28-2013
04:27 AM
|
0
|
2
|
935
|
|
POST
|
Hi, In the code example that you gave me, you added a Feature Layer which was in that FeatureService, not the whole FeatureService itself. If a FeatureService has multiple FeatureLayers then we will have to add them one by one using XAML tag <esri:FeatureLayer Thanks
... View more
08-28-2013
01:41 AM
|
0
|
0
|
663
|
|
POST
|
Hi, Could you define your question in more detail, I think didn't understand it. Hi, Thanks a lot for your reply. I have an ARcGIS 10.11 server in which I have MapService layers (Url ending with MapSErver) and FeatureService layers (url ending with FeatureServer). I wanted to ask that whether ArcGIS api for wpf allows addition of layers whose URl end with FeatureServer directly on to the map? The reason why I ask is that I cannot find any function for initializing feature "services" in the API however there are functions for TiledMap services and DynamicMapServices listed in the API reference. Thanks
... View more
08-28-2013
12:31 AM
|
0
|
0
|
663
|
|
POST
|
Hi all, Does ArcGIS API for WPF allows addition of FeatureServiceLayers on the map? or does it still only supports Feature Layers Regards Humz
... View more
08-27-2013
10:22 PM
|
0
|
4
|
2328
|
|
POST
|
never mind I got it. For people who faced similar issue, the trick is to use CLLocationManager and while you insert index into the polyline using [self.SketchLayer insertVertex:[self.mapView.locationDisplay mapLocation] inPart:0 atIndex:-1]; save this mapLocation in an array of AGSPoints at the same time. Regards
... View more
08-26-2013
10:56 PM
|
0
|
0
|
443
|
|
POST
|
Hi, How can we get all the coordinates (latitude and longitude) from agsmutablepolyline? Is there a function available in ArcGIS SDK for this? I was checking the API reference and couldnot find any. Thanks
... View more
08-26-2013
07:33 PM
|
0
|
1
|
3291
|
|
POST
|
Hi, I have a basic question. I have a KML layer loaded on the map in WPF as a GroupLayer. How can I access the Graphics of that KML Layers in C#? Would be grateful if someone can point me in right direction. Thanks
... View more
08-16-2013
12:28 AM
|
0
|
1
|
816
|
|
POST
|
Hi, Is is possible to wrap around a webmap? I am trying to do it using [self.mapView enablewraparound] but its not working for webmaps. Thanks Humz
... View more
08-14-2013
01:26 AM
|
0
|
1
|
817
|
|
POST
|
Humza, I have tried that but maybe I am putting it in the wrong spot or doing something else wrong. I am attaching my code for both calling the get image process and the process itself. Any help would be greatly appreciated. Calling
-(void) PrintPermitFinal
{
CAEAGLLayer *eaglLayer = (CAEAGLLayer *) self.mapView.layer;
eaglLayer.drawableProperties = @{
kEAGLDrawablePropertyRetainedBacking: [NSNumber numberWithBool:YES],
kEAGLDrawablePropertyColorFormat: kEAGLColorFormatRGBA8
};
// reset buttons
[selfsettoInitialMapView];
// create image and pdf
UIImage *screenshot = [[UIImage alloc] initWithData:[self getImage]];
// use clip path Rect to clip image to right size
CGImageRef imageref = CGImageCreateWithImageInRect([screenshot CGImage], clipRect);
screenshot = [UIImage imageWithCGImage:imageref];
//save image to photo album for testing only
UIImageWriteToSavedPhotosAlbum(screenshot,self,@selector(image:didFinishSavingWithError:contextInfo:),nil);
//Send Image to Dictionary
if (AppDelagate.PermitImages == nil)
{
AppDelagate.PermitImages = [[NSMutableDictionaryalloc] init];
}
NSString *Key= [selfCreatePermitID:[AppDelagate.GraphicToPrint.allAttributesvalueForKey:@"Full_Name"] AndAddress:[AppDelagate.GraphicToPrint.allAttributesvalueForKey:@"Owner_Address"]];
[AppDelagate.PermitImages setObject:screenshot forKey:Key];
self.tabBarController.selectedViewController = [self.tabBarController.viewControllersobjectAtIndex:1];
}
Getting the image virtually unchanged from Bernese
- (NSData *)getImage
{
GLint width;
GLint height;
glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &width);
glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &height);
NSInteger myDataLength = width * height * 4;
// allocate array and read pixels into it.
GLubyte *buffer = (GLubyte *) malloc(myDataLength);
glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
// gl renders "upside down" so swap top to bottom into new array.
// there's gotta be a better way, but this works.
GLubyte *buffer2 = (GLubyte *) malloc(myDataLength);
for(int y = 0; y < height; y++)
{
for(int x = 0; x < width * 4; x++)
{
buffer2[((height - 1) - y) * width * 4 + x] = buffer[y * 4 * width + x];
}
}
// make data provider with data.
CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, buffer2, myDataLength, NULL);
// prep the ingredients
int bitsPerComponent = 8;
int bitsPerPixel = 32;
int bytesPerRow = 4 * width;
CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceRGB();
CGBitmapInfo bitmapInfo = kCGBitmapByteOrderDefault;
CGColorRenderingIntent renderingIntent = kCGRenderingIntentDefault;
// make the cgimage
CGImageRef imageRef = CGImageCreate(width, height, bitsPerComponent, bitsPerPixel, bytesPerRow, colorSpaceRef, bitmapInfo, provider, NULL, NO, renderingIntent);
// then make the uiimage from that
UIImage *myImage = [[UIImage alloc] initWithCGImage:imageRef];
NSData *iDat = UIImageJPEGRepresentation(myImage, 0);
CGImageRelease(imageRef);
CGDataProviderRelease(provider);
CGColorSpaceRelease(colorSpaceRef);
free(buffer);
free(buffer2);
return iDat;
}
Cheers, Jeff Hi Jeff, does your print method gets called after user has pressed some button to take screenshot of the map ? if yes then kindly remove the first two lines of the code in print method and add them to a initialization method like didopenwebmap() or didloadmap() or your selfsettoInitialMapView() method and try again. Also please make sure that before you take the screenshot there should be no popup being displayed on the map. Regards
... View more
08-12-2013
11:23 PM
|
0
|
0
|
729
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-20-2015 10:57 PM | |
| 1 | 07-22-2015 03:58 AM | |
| 1 | 06-16-2015 10:15 PM | |
| 2 | 07-20-2015 11:30 PM | |
| 1 | 10-01-2015 01:18 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|