POST
|
welcome koldo!! glad to know that my code helped you. Regards, Harikant Jammi
... View more
11-15-2010
06:29 AM
|
0
|
0
|
624
|
POST
|
below formula converts 4326 latitude to 102100 latitude + (double)toWebMercatorY:(double)latitude { double rad = latitude * 0.0174532; double fsin = sin(rad); double y = 6378137 / 2.0 * log((1.0 + fsin) / (1.0 - fsin)); return y; } below formula converts 4326 longitude to 102100 longitude + (double)toWebMercatorX:(double)longitude { double x = longitude * 0.017453292519943 * 6378137; return x; } See my attachment , it contains a utility mercator convertor . You can simply import the class in your project and call the above static methods on it I have tried it with location manager and it works!!! Regards, Harikant Jammi
... View more
11-04-2010
05:12 AM
|
0
|
0
|
624
|
POST
|
Do not redisplay the graphicsLayer after getting results from first query. Redisplay only after end of second query. So you need to call [graphicsLayer dataChanged] ; only once that too after the end of the second query only...
... View more
10-28-2010
12:48 AM
|
0
|
0
|
214
|
POST
|
I have a gps button in my app which is used to toggle on/off the gps services. I am using the following code to toggle gps services. The method below is called when the button is touched -(void) startGPS { self.mapView.gps.autoPan = YES ; if ((self.mapView.gps.enabled)) { [self.mapView.gps stop]; [self.gpsButton setImage:[UIImage imageNamed:@"gps_off.png"] forState:UIControlStateNormal] ; } else if(!(self.mapView.gps.enabled)) { [self.mapView.gps start]; [self.gpsButton setImage:[UIImage imageNamed:@"gps_on.png"] forState:UIControlStateNormal] ; } } This code works fine when location services are turned ON. Now in iOS 4 , if location services are turned off only for that particular app keeping the global location settings ON then also my buttons are toggling to GPS ON state. Has anyone observed this problem ?? Is there a workaround for this. Ideally , I would like a sample code to use AGSGPS in a proper way. Regards, Harikant Jammi
... View more
10-27-2010
01:25 AM
|
0
|
1
|
721
|
POST
|
This is what i use , without forming an envelope [self.mapView centerAtPoint:((AGSPoint *)(graphic.geometry)) animated:YES]; NSArray * lodsArray = self.worldTopoMapService.tileInfo.lods ; //topomap service is AGSTiledMapServicelayer AGSLOD * finalLOD = [lodsArray objectAtIndex:5] ; // 5 is the tile level to zoom to while (self.mapView.mapScale >= finalLOD.scale) { [self.mapView zoomIn:YES] ; } [self.mapView showCalloutAtPoint:(AGSPoint *) graphic.geometry forGraphic:graphic] ;
... View more
10-03-2010
09:18 PM
|
0
|
0
|
743
|
POST
|
Once you have your queryTask dictionary, you could do something like this , NSString * s= [MyDictionary objectForKey : @"NUMBER_DATA"] ; double myNumber = [s floatValue] ; or [s intvalue] ; Is this what you are trying to do ??
... View more
08-18-2010
01:38 AM
|
0
|
0
|
228
|
POST
|
i think you have not set the delegate that's why you are not getting the event callbacks, put the below line in yur code before the query agp.delegate = self ;
... View more
08-12-2010
07:56 AM
|
0
|
0
|
346
|
POST
|
NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys: @"Input_Facilities",fset, nil]; The above statement should be like this according to me NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys: fset,@"Input_Facilities", nil];
... View more
08-10-2010
08:00 AM
|
0
|
0
|
346
|
POST
|
click on the blue icon of the project, then click on the blue "i" button on the top bar, you will see all the build settings. Now change the base sdk to iphone sim 3.2. Change in the similar way for targets also.
... View more
08-09-2010
10:47 PM
|
0
|
0
|
286
|
POST
|
It works! after commenting out the remove graphics I can now pull up my tables in a table view. But now I have a new problem, How do I remove the graphics that have been drawn? is it as easy as creating a new IBAction? -(IBAction)removeGraphics:(id)sender { [self.graphicsLayer removeAllGraphics]; } I have tried this in the past and had issues, as in nothing happened. So now that I have the zombie figured out, what is the proper way to clear the graphics? Again, Thanks for your help. I am new to development work so any help I can get is really appreciated! According to me, the placement of removeAllGraphics is wrong. I think you are using this command to fire your identity query - (NSOperation *)executeWithParameters:(AGSIdentifyParameters *) params Now put your removeAllGraphics in the line next to the above command or whatever command you are using to fire the identify query. Don't forget to add dataChanged after removing all graphics for redisplay. Regards, Harikant Jammi
... View more
08-06-2010
04:57 AM
|
0
|
0
|
346
|
POST
|
-[AGSGraphic retain]: message sent to deallocated instance 0xb7556e0 This means that the graphic object whose reference you were getting in the clickAccessory function got garbage collected, so its no more in existence. So when you were calling any message on that deallocated object , it crashed. So your object got prematurely released. Why don't you comment out removeAllGraphics command in your code. Tell me if it crashes then. If still you face a problem then I will have to take a look at your code. Fell free to contact me any time. My email id is harikant_jammi@yahoo.co.in and IM is jvrgopal@gmail.com
... View more
08-04-2010
08:37 PM
|
0
|
0
|
346
|
POST
|
Hi, When your app crashes on the simulator without any error messages , this means that you are over releasing an object or you are calling a function or variable on a deallocated instance. When you are going through such a scenario , do this 1) On Xcode top bar click on Project - > Edit Active Executable 2) Now you will get a window with two textboxes , the second textbox name is "Variables to be set in the environment" 3) Click on "+" button below , now you will have to add a new field 4) Now type the name entry as NSZombieEnabled and put its value as YES , ensure this entry is ticked 5) Clean your project and build, just before crash you will the object which is getting deallocated. if u cant follow the above instructions just search for NSZombieEnabled in google 😛 I have not worked with identity results , but i can say that your graphics object whose reference u stored may be getting released. Do something like this AGSSymbol* symbol = [AGSSimpleMarkerSymbol simpleMarkerSymbol]; symbol.color = [UIColor colorWithRed:0 green:0 blue:1 alpha:0.5]; for (AGSIdentifyResult* result in results) { result.feature.symbol = symbol; result.feature.infoTemplate = wellTemplate; [self.graphicsLayer addGraphic:result.feature]; featureDetailViewController.feature = result.feature ; // try adding this statement in here } [self.graphicsLayer dataChanged]; Get back to me if u have any problems Regards, Harikant Jammi
... View more
08-03-2010
10:12 PM
|
0
|
0
|
346
|
POST
|
Is map editing supported for AGSFeatureLayer for iOS 4 ? Is there any sample code which demonstrates use of this API ? Regards, Harikant Jammi
... View more
07-20-2010
01:23 AM
|
0
|
1
|
496
|
POST
|
IN case of a tab bar app, all the view controllers of the tab bar should override - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return YES ; } once all view controllers are allowed to autorotate , then only tab bar will rotate. One more way is subclass UITabBarController and then override its shouldAutoRotate function to YES. Tell me if it works or not. Regards, Harikant Jammi
... View more
07-15-2010
11:14 PM
|
0
|
0
|
384
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|