Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 01-13-2009, 12:58 AM   #14 (permalink)
ticket-directory
New Member
 
Join Date: Jan 2009
Posts: 1
ticket-directory is on a distinguished road
Default Loading Google Map in View

I've seen many are giving solutions but no one is providing detailed information that where it should be modified and how we can start running the application also in the Google-map-component there is no sample file included. So Here is the information for my friends who are new to Iphone map development!


To follow up on this issue, apparently the component is using wenear.com simply to host its javascript. That's unnecessary. The component can easily carry its own javascript with it and remove all non-google dependencies.

Place the current contents of iphone-test in a file called GoogleMapAPI.html in the project.

goto http://www.wenear.com/iphone-test and hit 'View Source'. Stick the contents of the source code into a new HTML file called GoogleMapAPI.html

Then change MapWebView -loadMap as follows.

- (void) loadMap {
int width = (int) self.frame.size.width;
int height = (int) self.frame.size.height;

NSString *path = [[[NSBundle mainBundle] pathForResource:@"GoogleMapAPI" ofType:@"html"]
stringByAppendingFormat:@"?width=%i&height=%i&zoom =%i",
width, height, DEFAULT_ZOOM_LEVEL];


NSURL *url = [[[NSURL alloc] initWithScheme:NSURLFileScheme host:@"localhost" pathath] autorelease];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[self loadRequest:request];
}


Enjoye IPHONE Development

Last edited by ticket-directory; 01-13-2009 at 01:05 AM. Reason: to provide complete information
ticket-directory is offline   Reply With Quote
 

» Advertisements
» Online Users: 430
13 members and 417 guests
apatsufas, chits12345, Creativ, dre, Hamood, iOS.Lover, jaychoupham, jeroenkeij, ketaskin, Kieren Harrold, kurtroom, QuantumDoja, tadaki
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,614
Threads: 94,086
Posts: 402,792
Top Poster: BrianSlick (7,990)
Welcome to our newest member, kurtroom
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:21 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.