[OpenLayers-Users] Automatically detecting and deploying mobile OL
Mr. Puneet Kishor
punk.kish at gmail.com
Thu Apr 28 17:48:47 EDT 2011
Jerome,
On Apr 28, 2011, at 3:57 PM, jrom wrote:
> Hi,
>
> You should take a look at http://engine.jeobrowser.com
> There are two endpoints : index.html for desktop version and
> indext.html for mobile version.
> Each endpoint has a custom build of OpenLayers : one desktop version
> based on OL 2.10 and one mobile based on the latest trunk of OL.
Thanks for the tip. Gives me a few ideas wrt OL. Seems like I have to get the latest OL trunk for mobile support, non?
By the way, I mentioned this earlier when you first announced jeobrowser. I can't use that because you have reserved all rights to it. From the code
* jEOBrowser : javascript Earth Observation Browser
* Copyright(c) 2008 - 2010 Jerome Gasperi
* All rights reserved
Second, I am trying to find some documentation, and other than the minned js file, I can't find any tutorial or docs.
The above two issues are a show-stopper, no matter how good the show.
Hope you are able to address them soon.
Many thanks,
Puneet.
>
> In the index.hml you can add a simple script to automatically redirect
> your user to the mobile version :
>
> <!-- Redirection based on user agent -->
> <script type="text/javascript">
>
> var uagent = navigator.userAgent.toLowerCase();
> /*
> * Redirect to mobile version for touch devices
> */
> if (uagent.indexOf("android") != -1 ||
> uagent.indexOf("ipad") != -1 || uagent.indexOf("iphone") != -1 ||
> uagent.indexOf("ipod") != -1) {
> window.location = 'indext.html';
> }
>
> </script>
>
>
> Best regards
>
> Jerome
>
> On Thu, Apr 28, 2011 at 6:45 PM, Mr. Puneet Kishor <punk.kish at gmail.com> wrote:
>> I am looking for an example of automatically detecting a mobile browser and deploying the correct OL build and functionality. Right now I am using OL 2.10. I am assuming that I would probably have to move up to a dev version of OL, correct?
>>
>> --
>> Puneet Kishor http://punkish.org
>> Researcher http://carbonmodel.org
>> Science Fellow http://creativecommons.org_______________________________________________
>> Users mailing list
>> Users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>>
>
>
>
> --
> http://jrom.info
More information about the Users
mailing list