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:
parent
bb3370bd26
commit
1a711323fe
5 changed files with 58 additions and 0 deletions
31
share-a-bike/app/assistants/mapScene-assistant.js
Normal file
31
share-a-bike/app/assistants/mapScene-assistant.js
Normal 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);
|
||||||
|
}
|
||||||
|
};
|
||||||
27
share-a-bike/app/views/mapScene/mapScene-chrome.js
Normal file
27
share-a-bike/app/views/mapScene/mapScene-chrome.js
Normal 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%"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
0
share-a-bike/app/views/mapScene/mapScene-scene.html
Normal file
0
share-a-bike/app/views/mapScene/mapScene-scene.html
Normal file
BIN
share-a-bike/images/icon-32.png
Normal file
BIN
share-a-bike/images/icon-32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
BIN
share-a-bike/images/icon-48.png
Normal file
BIN
share-a-bike/images/icon-48.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
Loading…
Add table
Reference in a new issue