Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeckman committed Jan 21, 2015
2 parents f10999c + 61a64a0 commit 23c0803
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions app/assets/javascripts/maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,13 @@ initialize = function () {
map.data.addListener('mouseout', function(event) {
map.data.revertStyle();
});
//map.setMap(map);

google.maps.event.addListener(map, 'click', function (event) {
var mapLatLng = event.latLng;
lat = mapLatLng.lat();
lng = mapLatLng.lng();
document.getElementById('taxonworks_link').text = 'TaxonWorks Latitude = ' + lat + ' , Longitude = ' + lng;
});
};

function initialize_map(options) {
Expand Down Expand Up @@ -161,7 +166,7 @@ function get_window_center() { // for use with home-brew geoJSON scanner/en
if (center_lat == undefined) {
wy = ymax - ymin;
center_lat = 0.5 * (ymax + ymin);
cutoff = 60.0
cutoff = 65.0
if(/*Math.abs(center_lat) > 45.0 &&*/ (ymax > cutoff || ymin < -cutoff)) {
angle = ymax - cutoff;
if (center_lat < 0) {
Expand All @@ -173,7 +178,7 @@ function get_window_center() { // for use with home-brew geoJSON scanner/en
}
}
;
if(wy > 0.5 * wx) {wx = wy * 3.0}
if(wy > 0.5 * wx) {wx = wy * 2.5}
if (wx <= 0.1) {gzoom =11};
if (wx > 0.1) {gzoom = 10};
if (wx > 0.2) {gzoom = 9};
Expand Down

0 comments on commit 23c0803

Please sign in to comment.