how to initially zoom a map in angular google maps

user8653311 picture user8653311 · Mar 22, 2018 · Viewed 16.5k times · Source

I am using agm/core in displaying the coordinates of a map. I have the code below

<agm-map [latitude]="10.3207886" [longitude]="123.90250049999997">
    <agm-marker [latitude]="10.3207886 [longitude]="123.90250049999997"></agm-marker>
</agm-map>

The view is this:

enter image description here

But I want to initially show the streets like this:

enter image description here

How to do that?

Answer

Aizen picture Aizen · Dec 12, 2018

The update for agm-map does not support center directives anymore. use zoom and latitude and long instead.

<agm-map [zoom]="13"  [latitude]="127.1" [longitude]="141.1">
                <agm-marker [latitude]="127.1" [longitude]="141.1"></agm-marker>
</agm-map>