﻿<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="PlaceEngine - Get Current Location" 
                description="PlaceEngine Mapplet"
                author="Jun Rekimoto"
                author_email="your-email@gmail.com"
                height="150">
  <Require feature="sharedmap"/>
</ModulePrefs>
<Content type="html"><![CDATA[

<script src="http://www.placeengine.com/javascripts/pengine.js" type="text/javascript"></script>

<style type="text/css">
<!--
* { margin: 0; padding: 0;}
p {padding-bottom: 6px;}
img {border: 0px; margin:0px 5px 0px 0px; vertical-align:middle;}
input {border: 0px; margin:0px 5px 0px 0px; vertical-align:middle;}
-->
</style>


<div>
<input alt="Register Locaiton" src="http://www.placeengine.com/images/wide_bt2.png" type="image" onclick='pe.registerLocation()' /><input alt="Get Current" src="http://www.placeengine.com/images/wide_bt1.png" type="image" onclick='pe.getLocation()' /> <a href="http://rkmt.net/wiki/index.php?title=Peapplet">?</a>
<p id="pestatus">Looking for PlaceEngine client...</p>
<p align="right"><a href="http://www.placeengine.com" target="_blank"><img src=http://www.placeengine.com/images/logo.png></a></p>
</div>

<script>
var map = new GMap2();
var pe = new PEngine({
    idstatus:"pestatus",
    appkey:"hmAsV6hboaDKU.b7zuS5FGZ5ig6KOfh1zw8nCsCzqB4GWd4DRFn3AReIkKPr3OnQ30jdHyxKmtMLOPDihkqa0jKy6I3l7XQwoV1F9GusiSRfAuGEBxoTU6QQ-aDZcUKM5FM.HxD6KIQoJkvqFJrkHRvIDScJFtY3fjTwwtmjOXuqZ7CHTINQ-yFaSN.Us5QMzQR.Ixak0Yw3rNIM38zH8O4Xv68LoXD7eaiVAdv2q8SpvUPei4i5JAEqRF.MvXYGwYOdAyZTpCUziqnO9NOAZ97pS3qFs5GyHnXN3jQMrTBCVDT64y7FMcjygu2WjUejvxZ3ZZrjQFDYUU4w9IPd1A__,aHR0cDovL21hcHMuZ21vZHVsZXMuY29t,R29vZ2xlIE1hcHM_",
    onGetLocation:function(x,y,r,info){
        if (map!=null && x!=0 && y!=0 && r>=0) map.setCenter(new GLatLng(y,x),r<100?17:16);
    },
});
pe.getLocation();
</script>

]]></Content>
</Module>
