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

Property 'value' does not exist on type 'ElementRef'
Getting all routes from current module - Angular 2
Ionic 2 Cache issue with tabs application
Set selected option by default on angular template
Downloading Redux State into an Angular 2 component and then iterating over its result
How to push on FormArray without FormBuilder on Angular 2
Angular 2, Uncaught Type Error: Cannot read property 'Injectable' of undefined
Set width to an Angular2-modal window
identityserver4 angular client, from where come the call to this endpoint
Angular2 translation after subscribing to service
Kendo UI - Texfield not showing in MultiSelect when Value is 0
InvalidPipeArgument for pipe 'DatePipe'
Native Element in angular 2
Module Communication between Product Module and User Module
How do I use login session in angular2 (local storage) with php backend
Angular : Array.splice in an ngFor with a pipe

Categories

HOME
angular
docker
videochat
loops
raster
form-submit
zurb-foundation
datatable
speech-recognition
ssd
uiviewcontroller
timezone
mutex
geoserver
http-headers
crc
pivot-table
jlabel
junit4
pentaho-spoon
border
beatbox
httpsession
pyvmomi
unimrcp
revit
structured-data
chinese-locale
mahapps.metro
side-effects
uisegmentedcontrol
gulp-4
regex-negation
web.py
webmin
transitions
pi
gobject
homescreen
nonetype
c#-6.0
fixture
pbs
mosync
rt
bandwidth
tivoli-identity-manager
wso2-appm
monocle-scala
ember-cli-mirage
qt4.8
canonical-link
type-systems
ldflags
helium
strstream
nested-attributes
jodconverter
yahoo-messenger
lg
traffic-simulation
8085
dynamics-nav-2009
webots
fody-propertychanged
android-context
tstringgrid
compiler-options
kiosk-mode
gliffy
workbench
accessdatasource
kiwi
pixate
controltemplate
jform-designer
android-x86
styledtext
nsfontmanager
kendo-tooltip
apprequests
imagecreatefrompng
maskedinput
converters
fatwire
getprocaddress
xemacs
layar
tao
zend-navigation
duck-typing
projective-geometry
vmwaretasks

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile