1
0
Fork 0
mirror of https://github.com/shouptech/share-a-bike.git synced 2026-02-03 12:29:42 +00:00

Added files needed for map scene

This commit is contained in:
mikeshoup@gmail.com 2010-12-18 17:01:05 +00:00
parent bb3370bd26
commit 1a711323fe
5 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,31 @@
function MapSceneAssistant(argFromPusher) {
this.items = argFromPusher.items;
this.gps = argFromPusher.gps;
this.markerIcon = "images/icon-32.png";
}
MapSceneAssistant.prototype = {
setup: function() {
Ares.setupSceneAssistant(this);
this.$.kioskMap.setLongitude(this.gps.longitude);
this.$.kioskMap.setLatitude(this.gps.latitude);
var icon = new google.maps.MarkerImage(
this.markerIcon,
new google.maps.Size(32,32),
new google.maps.Point(0,0),
new google.maps.Point(16,16)
);
for(var i = 0; i < this.items.length; i++)
{
var latlng = new google.maps.LatLng(this.items[i].latitude, this.items[i].longitude);
var marker = new google.maps.Marker({position: latlng, map: this.$.kioskMap.map, icon: this.markerIcon});
}
},
cleanup: function() {
Ares.cleanupSceneAssistant(this);
}
};

View file

@ -0,0 +1,27 @@
opus.Gizmo({
name: "mapScene",
dropTarget: true,
type: "Palm.Mojo.Panel",
h: "100%",
styles: {
zIndex: 2
},
chrome: [
{
name: "header1",
label: "Nearby Kiosks",
type: "Palm.Mojo.Header",
l: 0,
t: 0
},
{
name: "kioskMap",
latitude: 0,
longitude: 0,
type: "Palm.Mojo.Map",
l: 0,
t: 49,
h: "100%"
}
]
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB