Category Archives: iPhone

OpenLayers or GoogleMap v3 for mobile web app ?

I have experimented with OpenLayers 2.9 using touch.js extension for capturing touch events from iPhone/iPad. Although stripped down version of OL is about 184KB, the performance is very bad. If you have iPhone/iPad check this experiment: http://www.sumbera.com/lab/iphone/katastr.htm (note it will not work from desktop browser)

 OL team is working on v3 of OL to be more lighter, faster even for mobile devices, see here: http://trac.osgeo.org/openlayers/wiki/three  or here : http://openlayers.org/blog/2010/06/30/openlayers-3-on-github/

 Meanwhile I have tested new GoogleMaps v3 how it works on iPhone/iPad. despite few problems (stability, problems with cached tiles or disconnected JavaScirpt  to load new tiles -iPad)  it works pretty well . Check yourself this page from your mobile touch device (iPhone.iPad,Android): http://www.ikatastr.cz/iKatastrM.htm

Conclusion : Google Maps v3 wins on mobile over the Openlayers 2.9

 

[2011 September] UPDATE : new Openlayers 2.11 works quite well on iPad/iPhone.


Tiled WMS overlay on Google Map v3

this is the third sample of the tiled WMS overlay over the Spherical Mercator, this time over the new Google Map v3. Previsous post talked about overlyaing WMS in  Silverlight Bing maps (http://blog.sumbera.com/2010/02/25/overlay-wms-on-google-in-silverlight-bing/ ) and OpenLayers (http://blog.sumbera.com/2010/02/17/overlay-wms-on-google-in-openlayers/).

Sample application can be found here: http://www.sumbera.com/lab/GoogleV3/tiledWMSoverlayGoogleV3.htm You can try to run it on your mobile device as well – suprisingly it run very well on my iPhone (sometimes it just crash Safari :), however on the iPad there are some more serious issues that will be hopefuly resolved with new iOS update (JavaScript stops to run).

For the new Google Map v3 you have to do the following :

//Define custom WMS tiled layer
var SLPLayer =
 new google.maps.ImageMapType (
 {
  getTileUrl:
    function (coord, zoom) { 
      var proj = map.getProjection(); 
      var zfactor = Math.pow(2, zoom); 
       // get Long Lat coordinates
      var top = proj.fromPointToLatLng(
             new google.maps.Point(coord.x * 256 / zfactor, coord.y * 256 / zfactor) ); 
      var bot = proj.fromPointToLatLng(
            new google.maps.Point((coord.x + 1) * 256 / zfactor, (coord.y + 1) * 256 / zfactor)); 
      //corrections for the slight shift of the SLP (mapserver)
       var deltaX = 0.0013; 
       var deltaY = 0.00058; 
     
      //create the Bounding box string
       var bbox = (top.lng() + deltaX) + “,” +(bot.lat() + deltaY) +“,”
                           +(bot.lng() + deltaX) +“,” +(top.lat() + deltaY);
      
       //base WMS URL
        var url =
       “http://mapserver-slp.mendelu.cz/cgi-bin/mapserv?map=/var/local/slp/krtinyWMS.map&” ;
       url +=“&REQUEST=GetMap”; //WMS operation
       url +=“&SERVICE=WMS”; //WMS service
       url +=”&VERSION=1.1.1″; //WMS version 
       url +=“&LAYERS=” + “typologie,hm2003″; //WMS layers
       url +=“&FORMAT=image/png”; //WMS format
       url +=“&BGCOLOR=0xFFFFFF” ;
       url +=“&TRANSPARENT=TRUE” ;
       url +=“&SRS=EPSG:4326″; //set WGS84 
       url +=“&BBOX=”+ bbox; // set bounding box
       url +=“&WIDTH=256″; //tile size in google
       url +=“&HEIGHT=256″ ; 
       return url; // return URL for the tile    
     }, //getTileURL
 tileSize: new google.maps.Size(256, 256),
 isPng: true
 }); 
 //add WMS layer 
 map.overlayMapTypes.push(SLPLayer); 

 
 
 

iKatastr

 iKatastr is a first example of the Whatevermap 2.0 framework developed by Jiri Kaminek at Mendel University. you can read more on his blog here: http://mapserver.mendelu.cz/wordpress/. iKatastr enables to view cadastral information in Czech Republic and view the owner of the parcel/building.  I would like to mention here few technical details – iKatastr is actually less programmed but more configured. iKatastr on mobile uses Universal Map Format that defines the data sources for map composition and the query request when tapping on-screen. iKatastr in web do the same thing, it uses JSON definition to read full map composition. Moreover web version is linked with MapShake where the configuration of the map can be authored, verified, shared with friends and even you can generate your own iKatastr map as HTML page. the map you see on www.ikatastr.cz is the same that is stored on Mapshake here : http://www.mapshake.cz/549-iKatastr . To generate map similar to www.ikatastr.cz you need to press the <html> button   in the lower left corner to get this page: http://www.mapshake.cz/mapjs.aspx?i=549 from where you can copy/paste the full JavaScript stack to regenerate map on your side.  In the generated map you can also find this linked JavaScript : http://www.mapshake.cz/mi/549.js that is used  by www.ikatastr.cz.

So the bottom line is : do not programme, rather  generate / configure your maps !


Mapy.cz na iPhone- video

Seznam pracuje na verzi Mapy.cz pro iPhone.  Prozatim ukázal pouze screenshoty… např. zde http://www.iphonetips.cz/apple-novinky/mapy-cz-pro-iphone-exkluzivni-obrazky-z-betaverze/ , které ovšem vypadají velice  slibně. V rámci vývoje Whatevermap 2.0  se vyzkoušel prototyp přístupu ke zrojům mapy.cz na iPhone . Následující video předvádí mapy.cz na iPhone 3G s přístupem přes Wifi.  Tahle aplikace samozřejmě není a ani nebude dostupná na AppStore, jedná se pouze o experiment, který věřím, že Seznam výkonnostně překoná…nechme se překvapit…


Comparing iPhone GPS

As a follow up of this post : http://blog.sumbera.com/2009/10/22/gps-bluetooth-iphone-navigon/ about Holux 1200 external GPS used with iPhone2G  we have done little experiment. We took 3 iPhones generations (2G, 3G and 3GS) to compare their performance for turn-by-turn navigation. We have used Navigon and for 2G external bluetooth GPS Holux 1200 and Roqy BT stack.So 2G is jailbreaked.We have also used Trimble Recon to have precise reference GPS. Results can be seen in the following youtube video. Winner is 2G with external GPS ! 3GS and 3G are not serious GPS receivers for turn-by-turn navigation, although 3GS was better and kept the signal longer than 3G it was usualy behind the actual position of the car. 3G was poor most of the time and without the GPS signal.

 

One fun more thing: I have tried to use Roqy BT GPS inside the train with Navigon to get the information when train is approaching my destination.


iPhone and HOLUX1200 GPS bluetooth with Navigon

P1010254I have bought recently Navigon for iPhone for Europe and tested this in various conditions in Czech Republic. Despite overall great ratings I was disappointed.  The GPS signal was weak and was occasionally lost. When I drive on a road that is parallel to another road than the GPS point was jumping from one to another road (curiously ! ). Even strange was behavior like driving 130km/h on highway and Navigon jumped my position to side road ! In short weak GPS hardware in iPhone, bad weather conditions, dense urban areas makes this navigation unusable, or only working on 50%. GPS first lock takes sometimes more than 10 minutes if driving fast.

Navigon software is fantastic, no question about this, but what smash the quality down is GPS hardware. Now there is a solution to improve GPS in your iPhone – Use external GPS. One solution comes from TomTom with their iPhone holder. Another one is to use your own external GPS Bluetooth module and some trick how to enable iPhone to communicate with it. Actually to enable GPS BT module to work with iPhone you will need to jailbreak your iPhone and use something like Roqy GPS  http://www.roqy-bluetooth.net/roqyGPS.html

I have bought Roqy GPS license (8 EUR), and Holux 1200 GPS (40 EUR), I have used my first iPhone (2G) with OS 3.0 Jailbreaked. You have to install MobileSubstrat via Cydia, install roqyGPS, do obscure and obtrusive license registration with 32 digits (you will get license after paying over the PayPal and waiting up to 48 hours),  turn off internal iPhone Bluetooth and switch on RoqyGPS Bluetooth stack and voila you can use this in many iPhone applications using GPS. Even Whatever map, can use it. Nice thing is that Roqy GPS behaves as ‘first-class  citizen’ on iPhone – thta is other applications on iPhone can use GPS information comming from third part devices.  It is completely transparent form userpoint of view. Nice is that iPhone 2G has no GPS support so with this RoqyGPS hack you can learn youl old appliance to the new features.

So all works fine untill you try to turn-off screen (with upper iPhone button) then in my case external GPS connection has been lost and i had to switch off RoqyBT stack and connect device again. Also  unfortunately  you can’t  use  too much  Wi-Fi with the RoqyGPS  , somehow it is blocked . After some tesitng with Navigon on my trip to Bratislava it also crashed once the application. So there is still lot of places for improvments of it, but considering this is verison 0.9 I think it works very well in cases where you have pre-downloaded maps (like in Navigon) and you do not need to often go away from the external GPS .  Also bad thing is that license for Roqy  GPS is only for one concrete iPhone hardware, you can’t move it to another iPhone (this is more restrictive than Apple Store !)

iPhone Aplication tested:

Navigon Europe:  Holux1200 works with Navigon perfectly, it is like night and day  in comparision to embedded GPS performance. When just showing map (without navigaiton where it predicts position)  it precisely shows  location of my car

OffMaps: I just get trouble downloading tiles over the Wi-fi.

Whatevermap: works fine, nice to see detailed cadastral maps precise position (HOLUX 1200 is about 3-5m precise)

Last note: the picture used above is from perspective – it looks like Holux is bigg, in reality it looks like little bit bigger flash drive…

In summary: having paid for Navigon 139 USD and experiencing poor GPS performance- it is worth to use this RoqyGPS and invest cca 50 USD for external BT GPS and RoqyGPS driver . Consider this as real reason to jailbreak your iPhone to get most of this device.  Works fine with Navigon although it is sometimes obtrusive to re-pair devices if you move away from GPS BT device or you turn-off screen.

Update: in this follow-up post here http://blog.sumbera.com/2009/11/12/comparing-iphone-gps/ you can find video of GPS performance for 3 iPhones (2G with Holux, 3G and 3GS)

 


More Whatevermap screenshots


WhateverMap on Apple Store

WhateverMap Lite v1.0, developed by Jiri Kaminek  has been today accepted for distribution through Apple Store . You can download it here (iTunes and iPhone requiered):

tms://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=326649571&mt=8&s=143441

WhateverMap is similar to Google Maps but you can use different branch-specific map sources. Those sources should be more interesting and valuable in non-navigation filed of map using. WhateverMap use Web Map Services (WMS). WMS standard specification was created by the Open Geospatial Consortium (OGC). WMS may provide any geospatial data. There are many WMS severs and most of them are available for free. You can find servers with ortophoto, cadastral, soil types, migration of white storks, … simply WHATEVER.
You can add any WMS server by typing an URL address or simply use built-in catalog. There are some servers with interesting data as NASA Earth satellite photos, Mars satellite photos and many others. There is a rich list of Czech WMS servers.
You can browse a map using zoom-in, zoom-out or move. For better orientation it is possible to use actual position provided by built-in GPS module. Each WMS should map only limited area so there is a boundary of each map. It is possible to display whole map with boundary too.
It is possible to consume many sources in this application. So there is an easy way to change a source while browsing the map. You can easily compare the same area in different map sources. For example you can find out any building and then you can choose soil type map to determine stability of building’s foundation.
For better control of map there is a movement history. Sometimes GPS get lost a signal and display non-precision region. In this case it is posible to use undo and get more precision area before you get lost a signal. There is another interesting way to use the history. You can move around an area in first map layer and then use the same movements in different layers. For example you can follow a road and then you can use map layer with water or soil pollution to find out effect of road to water or soil quality.

MAP CONTROL:
・ZOOM-IN – double tap
・ZOOM-OUT – triple tap
・MOVEMENT – swipe on map

FEATURES:
- Consume any WMS server map data (ortofoto, cadastral, mars, … WHATEVER)
- Map browsing (move, zoom)
- Support history in map movements (UNDO, REDO)
- Display your current location
- Display map boundary
- Change background color
- Movement history(UNDO, REDO)
- favourite list of WMS

WHAT TO EXPECT IN THE NEXT RELEASES:
- searching by location name (city, roads, country, …) – geocoding
- caching
- saving for offline use
- better catalog
- landmarks

WHAT’S NEW IN THIS VERSION:
first release

LANGUAGES:
English

REQUIREMENTS:
Compatible with iPhone and iPod Touch
Requires iPhone OS 2.2.1 or later

What’s new

English

Screenshots


Whatevermap alpha

programmed by Jiri Kaminek (http://mapserver.mendelu.cz/eng/node/92)
music by Dave Fish, Album CITADEL  1998  (http://www.exwired.org/,
http://www.spaceboss.net/clanek.php?id=958 )


Netezza to compete with iPhone appliance

Netezza announced today availability of their revolutionary mobile device “iQuery”. “Netezza is redefining database”.

Quoted from press release: The Netezza iQuery is a fully integrated, portable, data collection device with five terabytes of queryable storage that allows users to collect and store data for ‘on the go’ analysis. Analytic functions are supplied to iQuery through downloadable applications — called “applytics” –which provide solutions to common dilemmas such as ‘should I wear a coat today’, ‘will the price of bread fall in my supermarket’ or ‘should I talk to that interesting looking person at the bar.’ When docked, iQuery connects to the Internet to search social media websites and other information providers to bring back options quickly and help decisions be reached with a minimum of debate and discussion

Definitely LOL for the 1st April , Netezza smart marketing always positively surprises me. http://www.netezza.com/data-warehouse-appliance-products/iquery.aspx


Follow

Get every new post delivered to your Inbox.