angular


Angular2 Google Maps panTo not working (does nothing)


I'm using Angular Google Maps (latest #agm/core) but can't get panTo or setCenter to work it simply does nothing.
I import GoogleMapsAPIWrapper like this:
import { GoogleMapsAPIWrapper } from '#agm/core';
I then inject it into my constructor:
constructor(
injector: Injector,
private _wrapper: GoogleMapsAPIWrapper
){
super(injector);
}
Then I try to call the above method in a function like so:
resetMap():void
{
this._wrapper.setCenter({lat:53.097900,
lng:-1.661963});
this._wrapper.panTo({lat:53.097900,
lng:-1.661963});
}
Please can anyone advise what I'm doing wrong? or how I am meant to reference the map to call methods against it.

Related Links

passing username and password to JWT Token Controller through an Angular 2 login form
How to Refresh Browsers after new deploy of Angular2 application
Angular4 aot debug
When bundling using systemjs-builder. At runtime i get an unable to get property 'prototype' of undefined or null reference
Issues with ng2-charts
Cordova media plugin is not working in marshmallow
Is Angular2 responsive out of the box?
Async call update HTML Element though Angular 4.x Service
Uncaught ReferenceError: define is not defined angular2/webpack 1
unable to find suitable angular data grid for angular 2.4.1 version?
Access process.env in environment.ts file created from the angular-cli
Cannot read property 'channels' of undefined youtube api
How to set the public path on angular 4
Using local Bootstrap3 with angular 2
Firebase: update database when no write operation happens in 5 minutes interval
Build single directive to perform both Structural & Attribute behaviour?

Categories

HOME
angular
excel
dll
unix
web-crawler
ipad
datatable
sublimelinter
android-animation
google-cardboard
playframework-2.5
spark-dataframe
mupdf
executable-jar
shogun
prestashop-1.6
zillow
twitter-streaming-api
flip-flop
django-channels
frama-c
pgadmin
inversifyjs
graphic
android-sensors
spacing
jqassistant
neoscms
rcp
ecore
phpexcel-1.8.0
gulp-4
crawler4j
codeigniter-2
nn
gobject
shieldui
lift
grayscale
multibox
grunt-string-replace
reduce
tableau-public
generated
gyp
voxel
local-variables
leshan
ldflags
decompression
ucp
qtquick2
spawn-fcgi
ibm-jazz
listboxitem
http-accept-header
r1soft
octopress
tess-two
bitarray
django-pipeline
eofexception
unexpectendoffile
jison
savefiledialog
gamma-function
rot13
kiosk-mode
componentone
comfortable-mexican-sofa
ember-qunit
cxf-client
rhodecode
string-conversion
android-x86
svggraph
worklight-studio
postfix-operator
rounded-corners
meteor-slides
stackmob
mib
ereg
batoo
file-association
emacs-dirtree
icarousel
visual-assist-x
nsinteger
dvorak
texinfo
snk
layar
alasset
open-flash-chart
open-basedir
xla

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App