Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with _map or _google properties being undefined in test #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ember-leaflet-google-tile-layer",
"version": "0.0.3",
"version": "0.0.4",
"description": "The default blueprint for ember-cli addons.",
"directories": {
"doc": "doc",
Expand Down
8 changes: 5 additions & 3 deletions vendor/current/Google.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,11 @@ L.Google = L.Layer.extend({
//setting the zoom level on the Google map may result in a different zoom level than the one requested
//(it won't go beyond the level for which they have data).
// verify and make sure the zoom levels on both Leaflet and Google maps are consistent
if ((this._map.getZoom() !== undefined) && (this._google.getZoom() !== Math.round(this._map.getZoom()))) {
//zoom levels are out of sync. Set the leaflet zoom level to match the google one
this._map.setZoom(this._google.getZoom());
if (this._map && this._google) {
if ((this._map.getZoom() !== undefined) && (this._google.getZoom() !== Math.round(this._map.getZoom()))) {
//zoom levels are out of sync. Set the leaflet zoom level to match the google one
this._map.setZoom(this._google.getZoom());
}
}
},

Expand Down