• R/O
  • HTTP
  • SSH
  • HTTPS

提交

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

newbmap


Commit MetaInfo

修訂1e243710b79f8616b16492eff9628339f6d2bf02 (tree)
時間2012-04-10 21:54:17
作者unknown <hirom@hiro...>
Commiterunknown

Log Message

do code cleaning

Change Summary

差異

--- a/public/javascripts/index.js
+++ b/public/javascripts/index.js
@@ -14,13 +14,21 @@ function docReady() {
1414 subDistances = new Array();
1515 }
1616
17+function loadMap() {
18+ map = new Bing.Map($('#map_body')[0], {
19+ credentials: mapCredential,
20+ center: new Bing.Location(35.69, 139.7),
21+ zoom: 12,
22+ mapTypeId:Microsoft.Maps.MapTypeId.road
23+ });
24+}
25+
1726 function mapOnMouseDown(e) {
1827 mouseDownLocation = new Bing.Point(e.pageX, e.pageY);
1928 }
2029
2130 function mapOnMouseUp(e) {
2231 var pixel = new Bing.Point(e.pageX, e.pageY);
23- // Only add a pushpin if the user is not panning the map.
2432 if (mouseDownLocation != null
2533 && mouseDownLocation.x == pixel.x
2634 && mouseDownLocation.y == pixel.y) {
@@ -73,15 +81,6 @@ function calcDistance(Loc1, Loc2) {
7381 return dist;
7482 }
7583
76-function loadMap() {
77- map = new Bing.Map($('#map_body')[0], {
78- credentials: mapCredential,
79- center: new Bing.Location(35.69, 139.7),
80- zoom: 12,
81- mapTypeId:Microsoft.Maps.MapTypeId.road
82- });
83-}
84-
8584 function doSearch() {
8685 map.getCredentials(callSearchService);
8786 return false;
--- a/routes/index.js
+++ b/routes/index.js
@@ -12,7 +12,7 @@ exports.published = function(req, res){
1212 pub_id = pub_id.replace("/", "");
1313
1414 res.render('published', {
15- title: 'Express',
15+ title: 'newb map: #' + pub_id,
1616 pub_id: pub_id
1717 })
1818 };
@@ -21,6 +21,11 @@ exports.loadpins = function(req, res){
2121 // load data from windows azure storage
2222 var pub_id = req.body.pub_id;
2323 var azure = require('azure');
24+// var account = "";
25+// var access_key = "";
26+// var host = "";
27+
28+// var client = azure.createTableService(account, access_key, host);
2429 var client = azure.createTableService();
2530 var tablename = "newbmap";
2631
@@ -53,7 +58,13 @@ exports.publish = function(req, res){
5358
5459 // save data to windows azure storage
5560 var azure = require('azure');
61+// var account = "";
62+// var access_key = "";
63+// var host = "";
64+
65+// var client = azure.createTableService(account, access_key, host);
5666 var client = azure.createTableService();
67+
5768 var tablename = "newbmap";
5869 for (var i = 0; i < req.body.locations.length; i++) {
5970 var item = {
--- a/views/index.jade
+++ b/views/index.jade
@@ -9,7 +9,7 @@ h1
99 script(src='http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0')
1010 #map_box
1111 #map_body
12- script(src='type=text/javascript', src='/javascripts/index.js')
12+ script(src='/javascripts/index.js')
1313 #total_distance
1414 span total distance:
1515 span#total_result 0
@@ -25,5 +25,3 @@ h1
2525 th longtitude
2626 th distance (km)
2727 tbody
28-
29-
--- a/views/published.jade
+++ b/views/published.jade
@@ -9,8 +9,8 @@ h1
99 script(src='http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0')
1010 #map_box
1111 #map_body
12- script(type='text/javascript', src='/javascripts/published.js')
13- script(type='text/javascript')
12+ script(src='/javascripts/published.js')
13+ script
1414 var pub_id = "#{pub_id}";
1515 #total_distance
1616 span total distance: