how can use openlayers in iphone sdk

2019-05-13 05:50发布

I want to create a customize map using by openlayer.But I am unable to use openlayer. I want to create map without using google map in iphone so I want to use other way in which I can fill own data in map. i think it possible by open layer , but how I dont know.So please help me.

3条回答
在下西门庆
2楼-- · 2019-05-13 06:03

It sounds like you are simply interested in providing custom maps in an iOS app. If that is so then MapBox-iOS-SDK will allow you to use many different map sources without the need for a web view. If you look at the MapBox projects on github they also have tools to help you create the maps that the SDK can use.

查看更多
时光不老,我们不散
3楼-- · 2019-05-13 06:08

you can use this by help of phonegap.

if you dont want to use phonegap then you can simply use UIWebView for that.you can load your data in it. load HTML files in UIWebView. html file including javascript and css and image files without any problem.

NSString *fullPath = [NSBundle pathForResource:@"filename" ofType:@"html" inDirectory:path];
 [yourWebView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:fullPath]]];

for more info on openLayers

查看更多
我只想做你的唯一
4楼-- · 2019-05-13 06:13

OpenLayers is a javascript library. As a client-based map viewing utility it allows to "display map tiles, vector data and markers loaded from any source". It is similar to Leaflet.

Both of them are only helpful if you want to render on the web (in which case you would need to grab map tiles or a map image from somewhere (OpenStreetMap for instance), or set up your own map server).

If what you want is to render a map natively on iOS, then you'll probably need a toolkit to fetch and render the map tiles or image. Here're a few that could be helpful:


查看更多
登录 后发表回答