Malloc
Malloc

Reputation: 16256

Problem in displaying the google maps API

when i use the google maps API, all went fine, however, i notice that the map contains some controls (buttons) which are not operational, this is a screenshot of what i am talking about : enter image description here

The three buttons on the top right and the arrows on the top left are not operational. My relevant code is this :

NSString *urlString = [NSString stringWithFormat:@"http://maps.google.com/maps?saddr=%f,%f&daddr=%f,%f&hl=fr&output=mobile&om=5",latUtilisateur,longUtilisateur,latStation,longStation];

    //Create a URL object.
    NSURL *url = [NSURL URLWithString:urlString];

    //URL Requst Object
    NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];

    //Load the request in the UIWebView.
    [webView loadRequest:requestObj];

Can i remove it from the map?

Upvotes: 0

Views: 296

Answers (2)

Shaunak
Shaunak

Reputation: 18008

Are you sure this is how you want to display google maps in iPhone, using a result of web url? Because there is a separate map view (Map Kit). A classic iphone google map should not have those buttons on top left. A map works with pinch and scroll!

Upvotes: 0

cutsoy
cutsoy

Reputation: 10251

Why aren't you using MapKit? Instead of adding a UIWebView, you can add a MKMapView and center to your geocoord. It's made by Apple (public API) so it's very smooth and works just like all other applications on iOS that are using maps.

Upvotes: 1

Related Questions