angularjs-google-maps icon indicating copy to clipboard operation
angularjs-google-maps copied to clipboard

Unable to reuse ngmap on dialog

Open abelbarbosa opened this issue 8 years ago • 2 comments

I'm trying to setup a location chooser using a dialog (from angular material).

Something like this:

<md-dialog>
    <form name="af" layout="column" data-ng-submit="save()">
        <md-toolbar>
           <!--  -->
        </md-toolbar>
        <md-dialog-content>
            <!--  -->
            <div map-lazy-load="https://maps.google.com/maps/api/js" map-lazy-load-params="{{::googleMapsUrl}}">
                <ng-map center="{{center}}" zoom="16" on-click="setPosition()">
                    <marker ng-if="position" position="{{position.lat}}, {{position.lng}}"></marker>
                </ng-map>
            </div>
            <!--  -->

        </md-dialog-content>
        <md-dialog-actions layout="row">
            <!--  -->
        </md-dialog-actions>
    </form>
</md-dialog>

It works the first time I use the dialog. After that the map is not rendered properly.

Is this a bug or am I doing something wrong?

abelbarbosa avatar Sep 30 '17 11:09 abelbarbosa

same issue.. still figure it out..

hadicahyadi avatar Sep 30 '17 19:09 hadicahyadi

Please look at this. https://github.com/allenhwkim/angularjs-google-maps#grey-area-in-google-maps

allenhwkim avatar Sep 30 '17 20:09 allenhwkim