Hi,
I have created a small web page that shows me my location. On my
computer, the page nicely and correctly shows my location in both
Safari and Firefox.
On my iPhone, I receive error 1002.
I guess that you are not supporting mobile Safari at the moment. Is
that correct and if yes, do you have plans to do so in the future?
Below, you find the source of my page:
Thanks - Joachim
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width = 320, user-scalable = no" />
<title>Loki Javascript API</title>
<script type="text/javascript" src="
http://loki.com/plugin/files/
loki.js"></script>
<script type="text/javascript">
function load() {
var loki = LokiAPI();
loki.onSuccess = function(location) {
document.getElementById('estimatedLocation').innerHTML
= location.latitude+', '+location.longitude;
};
loki.onFailure = function(error) {
document.getElementById("estimatedLocation").innerHTML
= "error: "+error;
};
loki.requestLocation(true,loki.NO_STREET_ADDRESS_LOOKUP);
loki.setKey( *** anonymized, replace with yours *** );
}
</script>
</head>
<body onLoad="load();">
<h4>Loki location</h4>
<div id="estimatedLocation">...loading locaction (takes some
seconds)</div>
</body>
</html>