Google Maps SDK离线使用 [英] Google Maps SDK Offline use

查看:560
本文介绍了Google Maps SDK离线使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目中,我有一个 ViewController ,其中显示带有许多标记的地图( GMSMapView )有一点我保存标记的坐标,因为我想在设备脱机时用标记显示地图。是否有可能使用谷歌地图SDK?当你离线时,我发现除了保存坐标外什么都没有。这是我的代码来保存坐标。

  NSData * json = [NSKeyedArchiver archivedDataWithRootObject:objRespuesta.respuestaJSON [@data]]; 
NSLog(@%@,json);
[OSPUserDefault guardarJson:json conPath:path];

但是当我脱机时,我的操作与在线时相同,但标记未显示在地图上。 / p>

解决方案

您无法使用 Google地图离线,但您可以添加自定义贴图地图以显示您何时离线。


In my project i have a ViewController in which I show a map (GMSMapView) with many markers, at some point i save the coordinates of the markers because I want to show the map with the markers when device is offline. Is it possible using google maps sdk? I've found anything but saving coordinates when you are already offline. This is my code to save coordinates.

NSData *json = [NSKeyedArchiver archivedDataWithRootObject:objRespuesta.respuestaJSON[@"data"]];
NSLog(@"%@",json);
[OSPUserDefault guardarJson:json conPath:path];

But when i get offline i do same as when online but markers are not showing on the map.

解决方案

You cannot use Google Maps offline, but you can add your custom map tiles to show when you are offline.

这篇关于Google Maps SDK离线使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆