我試圖加載UIWebview上的谷歌地圖並呼籲http://maps.google.com/?saddr=22.718019,75.884460&daddr=33.391823,-111.961731&zoom=10&output=embed,但它顯示錯誤「谷歌地圖嵌入API必須在UIWebview中的iFrame中使用」這是工作前,現在它不是working.I我試圖在iframe中加載這個URL這樣谷歌地圖嵌入API必須用於UIWebview中的iframe
NSString *googleMapsURLString = [NSString stringWithFormat:@"http://maps.google.com/?saddr=%1.6f,%1.6f&daddr=%1.6f,%1.6f&zoom=10",[self.startLat floatValue], [self.startLon floatValue], [self.destLat floatValue],[self.destLon floatValue]];
NSString *embedHTML = [NSString stringWithFormat:@"<iframe width=\"300\" height=\"250\" src=\"%@\" frameborder=\"0\" allowfullscreen></iframe>" ,googleMapsURLString];
NSString *html = [NSString stringWithFormat:embedHTML];
,但它不工作,並給予一定的WebKitError。
請幫忙.. 謝謝!
請在這裏包括答案的主要部分,並使用鏈接作爲參考。 –
...尤其是當鏈接現在已經死了... – Grimxn