mardi 12 mars 2013

Mobile Emulation using Google Developer Tools

While searching for a way to test how web pages (and applications) on mobile phones, I learned about Mobile Emulation using Google Developer Tools on Chrome. You can set a User Agent (Android, iPhone, iPad, even IE 7-9, Firefox and so on), emulate touch events, etc. This is the fast and efficient way to develop & debug web applications I was looking for.

Note: this is not intended to develop/debug native applications, but plain HTML/JavaScript pages.

For the record, first I had tried running web browsers on Android emulators using Eclipse. It turned out to be very slow, plus I didn't really needed any OS feature since I just needed the browser and a way to debug.

mercredi 6 mars 2013

MapQuickView - quickly view TMS layers on Android

In the past few days, I've been trying mobile development technologies for the first time. While learning and showing what I've done to my colleague at Mapgears, Simon Mercier suggested a mobile application I could work on that would be useful for him: a mobile mapping application to test how tiled layers look like on several devices.


MapQuickView - under the hood

From that idea came MapQuickView, which is built with PhoneGap for Android, Leaflet and jQuery.mobile. I used existing on-line examples to start from, like the OpenLayers jQuery mobile example and the Leaflet mobile example.  New UI features were added using jQuery.mobile.

TMS layers that are added are saved on the device using the Android Shared Preferences.  More specifically, I used this really nice AppPreferences plugin for PhoneGap made by Simon MacDonald that I could simply use directly in JavaScript.

In the end, all was just a matter of assembling existing OpenSource components that are available on the web to build this application.  It currently support TMS layers only, from existing live servers.


See it live

See what it looks like by visiting the Live web version (0.2), in which mobile-specific features don't work, but it will let you quickly feeling of the UI.


Install

If you wish to try it on your Android device, follow the installation instructions available on the GitHub repository.  Feel free to comment and log any issue you find.

Enjoy !