Also, the Ipad, so far as I know, doesn't have an onboard GPS...<br><br><div class="gmail_quote">On Wed, Jul 13, 2011 at 8:42 AM, Nicholas Efremov-Kendall <span dir="ltr"><<a href="mailto:n.e.kendall@gmail.com">n.e.kendall@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Wait...I'm confused...<div><br></div><div>enablehighaccuracy with a timeout set to earlier will get the high accuracy coords and get you the speed you want because it will use a cached location and not fire up the gps on the device, but it will give you the accuracy you want. If you're not using it as set to true, you're doing geoloc based on cell towers or ip...</div>
<div><br></div><div>as for what you use to get the coords, I'm using the same thing, aren't I? or am I missing something else here...</div><div><br></div><div>thanks for the link, here's one I found useful.</div>
<div><a href="http://mobile.tutsplus.com/tutorials/mobile-web-apps/html5-geolocation/" target="_blank">http://mobile.tutsplus.com/tutorials/mobile-web-apps/html5-geolocation/</a></div><div><div></div><div class="h5"><div>
<br><div><br><div class="gmail_quote">On Wed, Jul 13, 2011 at 8:35 AM, Noli Sicad <span dir="ltr"><<a href="mailto:nsicad@gmail.com" target="_blank">nsicad@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks for the tip.<br>
<br>
However, I rather do the GPS, since this is native app (hybrid app -<br>
Xcode and JS) and use<br>
<br>
position.coords.latitude<br>
position.coords.longitude<br>
<br>
See the advantage here:<br>
<br>
<a href="http://www.thecssninja.com/javascript/geolocation-iphone" target="_blank">http://www.thecssninja.com/javascript/geolocation-iphone</a><br>
<font color="#888888"><br>
Noli<br>
</font><div><div></div><div><br>
On 7/13/11, Nicholas Efremov-Kendall <<a href="mailto:n.e.kendall@gmail.com" target="_blank">n.e.kendall@gmail.com</a>> wrote:<br>
> set : enablehighaccuracy to True, that actually access the GPS on the<br>
> devices.<br>
><br>
> On Wed, Jul 13, 2011 at 1:02 AM, Noli Sicad <<a href="mailto:nsicad@gmail.com" target="_blank">nsicad@gmail.com</a>> wrote:<br>
><br>
>> Hi,<br>
>><br>
>> I would like to replace the Geolocate control functionality to reading<br>
>> from the GPS from mobile devices (e.g. iPhone and iPad 2). Geolocate<br>
>> html5 is so off from the actual real coordinate (lonLat) like 500<br>
>> metres away.<br>
>><br>
>> How are do I am going to do this in easiest and nicer way?<br>
>><br>
>> I am able to get the my current location (i.e. lon and lat values)<br>
>> from the iPhone/ iPad GPS to HTML DOM (i.e. Textbox).<br>
>><br>
>> e.g.<br>
>><br>
>> jQTouch with Xcode,<br>
>><br>
>> <ul class="edit rounded"><br>
>> <li>Longitude: <input id='lng' type="text" value='' /></li><br>
>> <li>Latitude: <input id='lat' type="text" value='' /></li><br>
>> </ul><br>
>><br>
>> Now, the question is, would I be able to get icon from the local<br>
>> directory, not from http server?<br>
>><br>
>> In this example below, it seems that OpenLayers.Icon is retrieved from<br>
>> http server.<br>
>><br>
>> ~~~~~~<br>
>> var icon = new OpenLayers.Icon('<br>
>> <a href="http://www.openstreetmap.org/openlayers/img/marker.png" target="_blank">http://www.openstreetmap.org/openlayers/img/marker.png</a>',size,offset);<br>
>> layerMarkers.addMarker(new OpenLayers.Marker(lonLat,icon));<br>
>> ~~~~~~<br>
>> from, <a href="http://wiki.openstreetmap.org/wiki/Openlayers_Track_example" target="_blank">http://wiki.openstreetmap.org/wiki/Openlayers_Track_example</a><br>
>><br>
>> If not, would vector maker good option for this?<br>
>><br>
>> In this example, <a href="http://openlayers.org/dev/examples/geolocation.html" target="_blank">http://openlayers.org/dev/examples/geolocation.html</a><br>
>><br>
>> How can I mapulated this function to cater to the lon and lat values<br>
>> from the GPS?<br>
>><br>
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
>> var geolocate = new OpenLayers.Control.Geolocate({<br>
>> bind: false,<br>
>> geolocationOptions: {<br>
>> enableHighAccuracy: false,<br>
>> maximumAge: 0,<br>
>> timeout: 7000<br>
>> }<br>
>> });<br>
>> map.addControl(geolocate);<br>
>> var firstGeolocation = true;<br>
>> geolocate.events.register("locationupdated",geolocate,function(e) {<br>
>> vector.removeAllFeatures();<br>
>> var circle = new OpenLayers.Feature.Vector(<br>
>> OpenLayers.Geometry.Polygon.createRegularPolygon(<br>
>> new OpenLayers.Geometry.Point(e.point.x, e.point.y),<br>
>> e.position.coords.accuracy/2,<br>
>> 40,<br>
>> 0<br>
>> ),<br>
>> {},<br>
>> style<br>
>> );<br>
>> vector.addFeatures([<br>
>> new OpenLayers.Feature.Vector(<br>
>> e.point,<br>
>> {},<br>
>> {<br>
>> graphicName: 'cross',<br>
>> strokeColor: '#f00',<br>
>> strokeWidth: 2,<br>
>> fillOpacity: 0,<br>
>> pointRadius: 10<br>
>> }<br>
>> ),<br>
>> circle<br>
>> ]);<br>
>> if (firstGeolocation) {<br>
>> map.zoomToExtent(vector.getDataExtent());<br>
>> pulsate(circle);<br>
>> firstGeolocation = false;<br>
>> this.bind = true;<br>
>> }<br>
>> });<br>
>> geolocate.events.register("locationfailed",this,function() {<br>
>> OpenLayers.Console.log('Location detection failed');<br>
>> });<br>
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
>><br>
>> Any ideas and implementation how to do this?<br>
>><br>
>> Thanks.<br>
>><br>
>> Regards, Noli<br>
>> _______________________________________________<br>
>> Users mailing list<br>
>> <a href="mailto:Users@lists.osgeo.org" target="_blank">Users@lists.osgeo.org</a><br>
>> <a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
>><br>
><br>
</div></div></blockquote></div><br></div></div>
</div></div></blockquote></div><br>