Skip to content

Commit

Permalink
fix for absolute center of map if Lat or Lng is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
driskull committed Sep 24, 2014
1 parent ec346b1 commit 17cdb25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,8 @@ define([
// get lat/lng
var lat = pt.getLatitude();
var lng = pt.getLongitude();
if (lat && lng) {
// if valid lat/lng
if (typeof lat !== "undefined" && typeof lng !== "undefined") {
dom.byId('lat_coord').value = lat.toFixed(5);
dom.byId('lng_coord').value = lng.toFixed(5);
// try to convert LL to other coordinates
Expand Down

0 comments on commit 17cdb25

Please sign in to comment.