Gwt Google maps

In case you want google maps in your gwt application you can use the
gwt-google-maps-v3 since gwt-google-apis is currently alpha.

You need to add the gwt-maps.jar on the build path but also you have to add the same jar at the WEB-INF/lib directory

And of course inside your module configuration file you need to add

<inherits name="com.google.maps.gwt.GoogleMaps" />

Then you are ready to go.


private GoogleMap placeMap;
private Marker placeMarker;

public void onModuleLoad() {

RootPanel rootPanel = RootPanel.get("main");
	
final MapOptions myOptions = MapOptions.create();
myOptions.setZoom(14.0);
myOptions.setMapTypeId(MapTypeId.ROADMAP);
LatLng myLatLng = LatLng.create(-34.397, 150.644);
myOptions.setCenter(myLatLng);
placeMap = GoogleMap.create(rootPanel.getElement(),myOptions);

}

Ios and http requests

You can either use NSURLRequest or NSMutableURLRequest
the difference is that with NSMutableURLRequest you can change the url the method etc.

I will use the NSMutableURLRequest

Supposing you have a class implementation


#import "UrlFetcher.h"

@implementation UrlFetcher

-(void)setUrl:(NSString *)url
{
    twitterUrl = [NSURL URLWithString:url];
}

-(void)fetchandParse
{
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:twitterUrl];
    [request setHTTPMethod:@"GET"];
    [[NSURLConnection alloc] initWithRequest:request delegate:self];    
}

- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response {
    NSLog(@"didReceiveResponse");
}

- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
    NSLog(@"got data");
    NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
    NSLog(result);
}

- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
{
}

- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
}
@end

Since you set as the delegate the class where the method is called you need to implement the
methods

- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response {}

- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data{}

- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error{}

- (void)connectionDidFinishLoading:(NSURLConnection *)connection{}