Angular-google-maps: Map does not center on second route.

Created on 9 Nov 2016  路  7Comments  路  Source: SebastianM/angular-google-maps

Map does not recenter after second navigation.

sebm-google-map(#epicMap='', [latitude]="lat", [longitude]="lng", [styles]="styles", [zoom]="zoom")
map-ref
sebm-google-map-marker([latitude]="lat", [longitude]="lng")

I use this.map.triggerResize() to force it to rerender in OnAfterViewInit. I have also tride subscribing to the changeBounds event without success.

Any ideas?

AgmMap more info stale discussion / question

Most helpful comment

I am also facing the same problem. Did anyone find the solution?

All 7 comments

Please provide a Plunker where I can see this. Otherwise it's really hard to help you

I also facing the similar issue, when I tried to set the lat & long of map to center it. But some how it's not working.
Please refer the http://plnkr.co/edit/rHXObQapqLuniW8kfC54?p=preview URL.

I have created the one function as SetCenter, 1st time it's working fine but after do any navigation from map it's not working and map is not center with given values.

Any Ideas on this issue ?

@anish751 , @johanssonfredrik did you ever find a solution? I have the same problem

Update: I've found the problem, in my case I was passing latitute as a string istead of a number and thats why it was not picked up

@anish751 , @johanssonfredrik did you find the solution? I have the same problem.

I am also facing the same problem. Did anyone find the solution?

+1

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexweber picture alexweber  路  4Comments

nthonymiller picture nthonymiller  路  4Comments

gnujeremie picture gnujeremie  路  3Comments

Halynsky picture Halynsky  路  3Comments

shedar picture shedar  路  4Comments