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

Error Referencing ng2-bootstrap.umd.min.js in asp.net core
How to do a router change on Angular2 from an observable error in a provider?
How to handle exception uniformly / globally for Angular2 / Typescript observables?
Reload child component when variables on parent component changes. Angular2
Changing Server port on Angular 2
Angular 2 typescript compilation error :A class declaration without the 'default' modifier must have a name
Angular 2: Select dropdown not selecting option despite “selected” attribute
angular2 singleton alternative
Angular2 terrible performance with ngFor assigning variable to “index”
nav.popToRoot() showing blank screen
Anguler2 js: getting no compatible version found : #types/node#^5.8.0
Angular 2 xi18n cannot resolve template path outside of component directory
Angular 2 - Uncaught (in promise): ReferenceError: System is not defined
update routes dynamically in angular2 app
Resolving Multiple Pieces of Data using Resolve Guard in Angular 2
Angular 2 disable form button from ts?

Categories

HOME
.htaccess
java-ee
scadalts
alexa
local-storage
encryption
analytics
mongoose
maven-lifecycle
conditional
webserver
raspberry-pi3
ios8
crc32
spark-dataframe
flannel
sql-azure
benchmarking
axon
adodb-php
zillow
cdb
gnome
xfce
gembox-document
ebcdic
lwip
neoscms
kinvey
ecore
word
magnolia
javapoet
google-optimize
umbraco-mvc
mapped-drive
trace
libphonenumber
xunit.net
ifttt
canvas-lms
appharbor
implicit
sqlcommand
asana-connect
self-referencing-table
swig-template
google-plus-domains
ienumerable
firefox-addon-bootstrap
data-connections
arrangeoverride
blackberry-simulator
togglz
johnny-five
wx
undefined-symbol
steroids
pig-udf
agsxmpp
magnetometer
uploadifive
function-prototypes
facade
code-metrics
syntactic-sugar
worklight-server
kooboo
objectarx
policies
dynamic-html
citrix-access-gateway
tiles2
struts2-tiles-plugin
outlook-2003
customvalidator
dotfuscator
pmp
single-user
tao
zend-navigation
asp.net-mvc-2-validation
executequery
application-design
xla
pointer-arithmetic
astoria

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