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

Accessing a variable from a child component in Angular 2
How are Modules and Components saved internally?
Angular2 Controlling Focus And Select programmatically
visual studio 2017 add as link content files (aspnetcore)
Routes under Routes - Angular 2
Angular2 - Discreet Features in an Existing Application
How to populate the template URL of a Angular2
Angular 2 “Cannot match any routes” on named outlet
Angular2: #HostBinding or host: {}?
How to add an async validator to a CUSTOM field?
Angular2 ng-bootstrap: Reuse modal template with different data
How to use DateRangePicker directive in Angular 2?
Angular 2 defining base url
angular2 quickstart demo not works
Changing root route from different module
Can't get forkJoin to fire

Categories

HOME
google-analytics
okta
reverse-geocoding
selenium-chromedriver
kotlin
https
google-speech-api
amazon-redshift
rpres
osticket
bpm
.net-4.5
konvajs
twitter-streaming-api
moshi
visualvm
greedy
cdb
summary
cookie-session
ply
ctype
eureka-forms
heatmap
modeling
atom-feed
multiple-domains
regex-negation
angularjs-ng-model
webmin
ats
oracle-ebs
grayscale
templating
protactor
webos
multibox
canvas-lms
silent-installer
tinyxml2
webrole
generated
jedi-vim
graylog
docker-registry
rpy2
code-signing-entitlements
canonical-link
android-image
decompression
ucp
sharepoint-userprofile
lzma
website-deployment
jquery-widgets
zurb-foundation-5
mod-jk
xmlpullparser
akeneo
bpopup
ngen
virtual-address-space
kindle-fire
data-sharing
rhodecode
wxgrid
raii
linq-to-lucene
rails-i18n
apiaxle
resourcedictionary
alassetslibrary
mapstraction
postfix-operator
meteor-slides
rs485
imagecreatefrompng
xadisk
ldapconnection
file-association
jax-rpc
visual-assist-x
memory-mapped-files
happstack
ubuntu-9.10
rails-models
xcode4.1
test-environments
visual-programming
vmwaretasks
resource-cleanup
testing-strategies

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile