By 2014/15 mobile internet is predicated to overtake desktop usage
Average UK 3g speed is 1.5Mbit/s, average broadband speed is 6.2Mb/s While we may have gotten a little lazy about optimization now we all have broadband connections mobile mapping reminds us just how important it is to optimize filesizes and data transferYes we have smartphones with wifi but your creating maps on mobile because people need them on the move right?
- You only need 5 decimal places for sub-metre accuracy sending any more in your data (even if you store it with more) is a big waste, this can often save 20%-50% in data transfer size just by rounding
- Transfering data as XML/GeoRSS is verbose look at JSONWCF supports JSON encoding from your objects with a line of code, Jquery makes consuming it simpleYou can see data transfer improvements of 20-40%
This is how easy it is to make wcf serve json objects just one attribute and all your .net objects are now jsonThere are two different ways one per method and one for the entire service
-Loading data when you know you actually need it can make a big difference-only load pushpin detail when clicked-only load data shown on the current map view, if you have lots- That advice will cost you …. One million dollars!
EnablingGzip compression, which is supported by all major web servers typically gains 50-70% decrease in size, just ensure you have spare cpuIf you packets are small though you do need to consider if the overhead is worth it so its worth testingAlso remember to minify your js and css files if you are using VS then take a look at chirpy.codeplex.com
- As we all know mobile connections are not great so you application at least has to handle disconnections even if just my alerting the user
These are for the UK in March 2011 (http://www.guardian.co.uk/technology/2011/apr/18/smartphone-market-android-win-nokia-rim-lose)Android and RIM are still big players and the market is more diverse than you may realise
- Officially supports- Notice no Wp7, lets hope that’s a confirmed part of the upcoming mango release
- Default infobox is fine for the ipad
Same cannot be seen on the iphones smaller screenSo you need to think about different infoboxapproachess
Simple example of more mobile friendly infobox using jquery mobileConventions over configuration
We have often used context menus on mapping tools by right clicking the mouseObviously not possible on mobile but a well used alternative is the tap holdYou can think about how you might use other more complex gestures and emerging js libraries like jquery mobile are starting to add support for these kind of events
HTML 5 has a location API built in that we cannot rely on for desktop users but mobile users are a different matter