You are here

Mobile development

Mobile Offline Map Client with Cordova hybrid HTML5

Mobile Offline Map Client, is it necessary? Yes, if you work outside but there is not network or wifi, but you still need WMS to display the map and WFS to edit the feature, offline functionality will help.

After research and inspired by other ideas, /?q=en/node/72475

Then the mobile offline hybrid HTML5 map client is born, frameworks or plugins it used:

1. OpenLayers: Go
2. Sencha-touch: Go

Offline mobile HTML5 map client

Collecting some research for Offline mobile HTML5 map client.

1. Research one

Phonegap + Leaflet + TileMill = Offline Mobile Maps  

navigator.geolocation not work in Android 4.1.2, soulution

One hybrid app with Phonegap 1.9.0 worked fine in Android 3.0 and 4.0, but when I update the OS to 4.1.2, the navigator.geolocation stop working.
Firstly i update the project with new version of phonegap cordova 2.7.0, it does not help. And I found even i test navigator.geolocation in Android native brower, under this demo link:

http://html5demos.com/geo
The gps operation was never be called. And i found many other developers have same problem in new Android OS.

At last I found one solution(not 100%, but at least works now):
My orginal code:
 

OSM mobile open source project

1. http://osmand.net/
you will find open source project for Android, WP7, WP8, WinRT.

2. osmdroid, Offline map library with OSM
http://code.google.com/p/osmdroid/

3. mapsforge, android library with OSM, support also offline
http://code.google.com/p/mapsforge/

4. osmbonuspack
osmdroid is a library to interact with OpenStreetMap data inside an Android application. It offers an almost full/free replacement to Android map objects: MapView, MapController, Overlays, etc.

http://code.google.com/p/osmbonuspack/

5.
Using OSMDroid for Offline mapping in Android

Sailfish OS

The Sailfish OS is a mobile-optimized operating system, baseed on Linux core, support Qt™ platform, and you can develop Android, QT, and HTML5 app for it.

This new mobile OS will release its first phone in China.

https://sailfishos.org/

Sencha Touch 2 Orientation problem in Android browser or Webview

Issue:
Sencha Touch 2 was used in project and tested in Android browser or webview, when orietation is being changed, from landscape to portait or reverse, the layout will take the previous orietation's height, or half of the screen.

Solution:

Ext.setup({
viewport:{
autoMaximize:true},
onReady:function(){
Ext.Viewport.on('orientationchange', function() {
if (Ext.os.is.Android) {
Ext.Viewport.setSize(window.innerWidth,window.innerHeight);
}
});

......
}
...

Refer:

Subscribe to RSS - Mobile development