Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save helderjnpinto/b59ee3a4c7f32390c93e6eb22b1869e7 to your computer and use it in GitHub Desktop.
Save helderjnpinto/b59ee3a4c7f32390c93e6eb22b1869e7 to your computer and use it in GitHub Desktop.
declare var google: any;
@IonicPage()
@Component({
selector: 'page-photo-on',
templateUrl: 'photo-on.html'
})
export class PhotoOnPage {
public zoomOk: boolean;
constructor(...){
...
}
setZoomState(v: boolean = false) {
this.zoomOk = v;
}
public loadMap(){
google
.maps
.event
.addListener(this.map, 'zoom_changed',
() => {
let zoom = this.map.getZoom();
if (zoom <= 11 && !this.showOneTime ){
this.presentToast('To view spots please zoom in.');
}
this.setZoomState((zoom >= 11));
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment