diff --git a/trunk/share-a-bike/app/assistants/mapScene-assistant.js b/trunk/share-a-bike/app/assistants/mapScene-assistant.js new file mode 100644 index 0000000..b60db7b --- /dev/null +++ b/trunk/share-a-bike/app/assistants/mapScene-assistant.js @@ -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); + } +}; \ No newline at end of file diff --git a/trunk/share-a-bike/app/views/mapScene/mapScene-chrome.js b/trunk/share-a-bike/app/views/mapScene/mapScene-chrome.js new file mode 100644 index 0000000..6e0b3a0 --- /dev/null +++ b/trunk/share-a-bike/app/views/mapScene/mapScene-chrome.js @@ -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%" + } + ] +}); \ No newline at end of file diff --git a/trunk/share-a-bike/app/views/mapScene/mapScene-scene.html b/trunk/share-a-bike/app/views/mapScene/mapScene-scene.html new file mode 100644 index 0000000..e69de29 diff --git a/trunk/share-a-bike/images/icon-32.png b/trunk/share-a-bike/images/icon-32.png new file mode 100644 index 0000000..e64502a Binary files /dev/null and b/trunk/share-a-bike/images/icon-32.png differ diff --git a/trunk/share-a-bike/images/icon-48.png b/trunk/share-a-bike/images/icon-48.png new file mode 100644 index 0000000..6bceb3e Binary files /dev/null and b/trunk/share-a-bike/images/icon-48.png differ