Always center map on marker

Not centering is of dubious usefulness, and doesn't work
at all with a short link.
This commit is contained in:
John Firebaugh 2013-07-30 13:44:49 -07:00
parent dcbc42b1a4
commit f1a6755060

View file

@ -61,20 +61,6 @@ L.OSM.share = function (options) {
.bind('change', toggleMarker))
.append(I18n.t('javascripts.share.include_marker')));
$('<div>')
.attr('class', 'form-row')
.appendTo($form)
.append(
$('<label>')
.attr('for', 'center_marker')
.append(
$('<input>')
.attr('id', 'center_marker')
.attr('type', 'checkbox')
.prop('checked', true)
.bind('change', update))
.append(I18n.t('javascripts.share.center_marker')));
$('<div>')
.attr('class', 'form-row')
.appendTo($form)
@ -267,7 +253,7 @@ L.OSM.share = function (options) {
}
function update() {
if (map.hasLayer(marker) && $('#center_marker').is(':checked')) {
if (map.hasLayer(marker)) {
map.panTo(marker.getLatLng());
}
@ -276,9 +262,6 @@ L.OSM.share = function (options) {
$('#link_marker')
.prop('checked', map.hasLayer(marker));
$('#center_marker')
.prop('disabled', !map.hasLayer(marker));
$('#image_filter')
.prop('checked', locationFilter.isEnabled());