@@ -41,7 +41,12 @@ overviewer.collections = {
|
|||||||
/**
|
/**
|
||||||
* holds a reference to the spawn marker.
|
* holds a reference to the spawn marker.
|
||||||
*/
|
*/
|
||||||
'spawnMarker': null
|
'spawnMarker': null,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* if a user visits a specific URL, this marker will point to the coordinates in the hash
|
||||||
|
*/
|
||||||
|
'locationMarker': null
|
||||||
};
|
};
|
||||||
|
|
||||||
overviewer.classes = {
|
overviewer.classes = {
|
||||||
@@ -102,4 +107,4 @@ overviewer.gmap = {
|
|||||||
return(urlBase + url);
|
return(urlBase + url);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
overviewer.util = {
|
overviewer.util = {
|
||||||
|
|
||||||
// vars for callback
|
// vars for callback
|
||||||
readyQueue: [],
|
readyQueue: [],
|
||||||
isReady: false,
|
isReady: false,
|
||||||
|
|
||||||
/* fuzz tester!
|
/* fuzz tester!
|
||||||
*/
|
*/
|
||||||
'testMaths': function(t) {
|
'testMaths': function(t) {
|
||||||
@@ -91,6 +91,10 @@ overviewer.util = {
|
|||||||
|
|
||||||
compass.render();
|
compass.render();
|
||||||
spawnmarker.render();
|
spawnmarker.render();
|
||||||
|
if (overviewer.collections.locationMarker) {
|
||||||
|
overviewer.collections.locationMarker.setMap(null);
|
||||||
|
overviewer.collections.locationMarker = null;
|
||||||
|
}
|
||||||
|
|
||||||
// update list of spawn overlays
|
// update list of spawn overlays
|
||||||
overlayControl.render();
|
overlayControl.render();
|
||||||
@@ -555,5 +559,7 @@ overviewer.util = {
|
|||||||
|
|
||||||
overviewer.map.setCenter(latlngcoords);
|
overviewer.map.setCenter(latlngcoords);
|
||||||
overviewer.map.setZoom(zoom);
|
overviewer.map.setZoom(zoom);
|
||||||
|
var locationmarker = new overviewer.views.LocationIconView();
|
||||||
|
locationmarker.render();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ overviewer.views.CoordboxView = Backbone.View.extend({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
overviewer.views.ProgressView = Backbone.View.extend({
|
overviewer.views.ProgressView = Backbone.View.extend({
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
this.el.id = 'progressDiv';
|
this.el.id = 'progressDiv';
|
||||||
this.el.innerHTML = 'Current Render Progress';
|
this.el.innerHTML = 'Current Render Progress';
|
||||||
@@ -556,3 +556,22 @@ overviewer.views.SpawnIconView = Backbone.View.extend({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
overviewer.views.LocationIconView = Backbone.View.extend({
|
||||||
|
render: function() {
|
||||||
|
//
|
||||||
|
if (overviewer.collections.locationMarker) {
|
||||||
|
overviewer.collections.locationMarker.setMap(null);
|
||||||
|
overviewer.collections.locationMarker = null;
|
||||||
|
}
|
||||||
|
overviewer.collections.locationMarker = new google.maps.Marker({
|
||||||
|
'position': overviewer.map.getCenter(),
|
||||||
|
'map': overviewer.map,
|
||||||
|
'title': 'location',
|
||||||
|
'visible': false,
|
||||||
|
'animation': google.maps.Animation.DROP
|
||||||
|
});
|
||||||
|
overviewer.collections.locationMarker.setVisible(true);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user