WebKitErrorDomain error 101 (in mapview)
here is my code i get this error
NSString *url = [NSString stringWithFormat:@"%@?lat=%@&long=%@",
[[NSBundle mainBundle开发者_运维问答] pathForResource:@"map" ofType:@"html"],
@"17.734503",
@"83.2999716"];
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:url]];
DirctionWeb.delegate = self;
[DirctionWeb loadRequest:request];
so here i connect webpage into google map html page why this error message please guide me
Make sure the url isproperly encoded and has the +- on the lat and long, like so:
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://maps.google.com/?q=+17.734503,+83.2999716"]];
DirctionWeb.delegate = self;
[DirctionWeb loadRequest:request];
So, replace this:
NSString *htmlFile = [NSString stringWithFormat:@"%@?lat=%@&long=%@",
[[NSBundle mainBundle] pathForResource:@"map" ofType:@"html"],
@"17.734503",
@"-83.2999716"];
With:
NSString *htmlFile = [NSString stringWithFormat:@"%@?lat=+.000000f&long=%+.000000f",
[[NSBundle mainBundle] pathForResource:@"map" ofType:@"html"],
@"17.734503",
@"-83.2999716"];
精彩评论