@@ -41,7 +41,12 @@ overviewer.collections = {
|
||||
/**
|
||||
* 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 = {
|
||||
@@ -102,4 +107,4 @@ overviewer.gmap = {
|
||||
return(urlBase + url);
|
||||
};
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
overviewer.util = {
|
||||
|
||||
|
||||
// vars for callback
|
||||
readyQueue: [],
|
||||
isReady: false,
|
||||
|
||||
|
||||
/* fuzz tester!
|
||||
*/
|
||||
'testMaths': function(t) {
|
||||
@@ -91,6 +91,10 @@ overviewer.util = {
|
||||
|
||||
compass.render();
|
||||
spawnmarker.render();
|
||||
if (overviewer.collections.locationMarker) {
|
||||
overviewer.collections.locationMarker.setMap(null);
|
||||
overviewer.collections.locationMarker = null;
|
||||
}
|
||||
|
||||
// update list of spawn overlays
|
||||
overlayControl.render();
|
||||
@@ -555,5 +559,7 @@ overviewer.util = {
|
||||
|
||||
overviewer.map.setCenter(latlngcoords);
|
||||
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() {
|
||||
this.el.id = 'progressDiv';
|
||||
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