开发者

OpenLayers in Android

开发者 https://www.devze.com 2023-03-01 14:41 出处:网络
Has anyone tried before using OpenLayers in Android ? How did that go ? W开发者_运维问答as it accessed through the browser at a certain addressor embedded in a local stand alone android applicationusi

Has anyone tried before using OpenLayers in Android ? How did that go ? W开发者_运维问答as it accessed through the browser at a certain address or embedded in a local stand alone android application using WebViews ? , or other approach.

If any references related to this subject come to your mind please add them here.

Thanks


Small update on the topic - currently released version of OL supports mobile devices.


Current version of OpenLayers(2.10) doesn't support mobile browsers. New version(2.11) is very close to release though and you can enable support for mobile devices if you include the development version of OpenLayers from trunk. It definitely works if you access it as usual webpage and should work if it's embedded in WebViews.

You can try it out yourself here: http://openlayers.org/en/latest/examples/

Just type 'mobile' in search field and you'll get couple of example where you can see how mobile navigation, editing, etc. works on Android and iOS.


Yo can try with OpenLayers latest Mobile Version (http://openlayers.org/en/latest/examples/mobile-full-screen.html) for an html project and embed the page in Mobile App with Apache Cordova (http://cordova.apache.org/)


To my knowledge (no such device owned), on Android 3+ devices a page like http://openlayers.org/dev/examples/mobile.html will work straight out-of-the-box when opened in the stock browser. As mentioned, since OL 2.11 mobile device multitouch events are supported, they have also provided a jquery mobile & geolocation demo which works great on android.

For the majority of android 2.x devices, you will need to deliver your own webview container including a polyfill such as WMP if you want spread & pinch zooming to work.

Otherwise you're only left with using the zoom buttons - which is not always preferable given the small size of many touch screens.

0

精彩评论

暂无评论...
验证码 换一张
取 消