Skip to content
This repository was archived by the owner on Nov 30, 2018. It is now read-only.
This repository was archived by the owner on Nov 30, 2018. It is now read-only.

a.lat is not a function when adding fit="true" on ui-gmap-markers #1467

@liadlivnat

Description

@liadlivnat

Hi this is my map, for some reason i get this error, not sure why, please help!

This is the stack trace:

TypeError: a.lat is not a function
at oh.extend (main.js:34)
at Object.angular.module.service.fit (angular-google-maps.js:968)
at MarkerManager.angular.module.factory.MarkerManager.fit (angular-google-maps.js:2237)
at MarkerManager.bind as fit
at angular-google-maps.js:5015
at processQueue (angular.js:14634)
at angular.js:14650
at Scope.$get.Scope.$eval (angular.js:15878)
at Scope.$get.Scope.$digest (angular.js:15689)
at angular.js:15917

  <ui-gmap-google-map ng-if="render"
                        bounds="mapOption.bounds"
                        center="mapOption.center"
                        zoom="mapOption.zoom"
                        control="myGoogleMap">

        <ui-gmap-markers models="mapOption.markers" coords="'coords'" fit="true" click="onClick">
            <ui-gmap-window coords="mapOption.selected.coords" show="windowOptions.show" closeClick="closeClick()"
                            ng-if="isReportInfo('incident')">
                <div>
                    <span><b>Type:</b> {{mapOption.selected.type}} </span><br>
                    <span><b>Phone:</b> {{mapOption.selected.phone}} </span><br>
                    <span><b>Priority:</b> {{mapOption.selected.priority}} </span><br>
                    <span><b>Date:</b> {{mapOption.selected.timestamp | date:'H:mm, MM/dd/yyyy'}}</span>
                </div>
            </ui-gmap-window>
            <ui-gmap-window coords="mapOption.selected.coords" show="windowOptions.show" closeClick="closeClick()"
                            ng-if="isReportInfo('attendance')">
                <div>
                    <span><b>Employee:</b> {{mapOption.selected.employee}} </span><br>
                    <span><b>Employee Name:</b> {{mapOption.selected.employee_name}} </span><br>
                    <span><b>Date:</b> {{mapOption.selected.timestamp | date:'H:mm, MM/dd/yyyy'}}</span>
                </div>
            </ui-gmap-window>
            <ui-gmap-window coords="mapOption.selected.coords" show="windowOptions.show" closeClick="closeClick()"
                            ng-if="isReportInfo('form_submissions')">
                <div>
                    <span><b>Form Name:</b> {{mapOption.selected.form_name}} </span><br>
                    <span><b>Phone:</b> {{mapOption.selected.phone}} </span><br>
                    <span><b>Score:</b> {{mapOption.selected.score}} </span><br>
                    <span><b>Date:</b> {{mapOption.selected.timestamp | date:'H:mm, MM/dd/yyyy'}}</span>
                </div>
            </ui-gmap-window>
            <ui-gmap-window coords="mapOption.selected.coords" show="windowOptions.show" closeClick="closeClick()"
                            ng-if="isReportInfo('locations')">
                <div>
                    <span><b>Phone:</b> {{mapOption.selected.phone}} </span><br>
                    <span><b>Status:</b> {{getStatusDesc(mapOption.selected.status)}}</span><br>
                    <span><b>Date:</b> {{mapOption.selected.timestamp | date:'H:mm, MM/dd/yyyy'}}</span>
                </div>
            </ui-gmap-window>
            <ui-gmap-window coords="mapOption.selected.coords" show="windowOptions.show" closeClick="closeClick()"
                            ng-if="isReportInfo('panic_report')">
                <div>
                    <span><b>Phone:</b> {{mapOption.selected.phone}} </span><br>
                    <span><b>Date:</b> {{mapOption.selected.timestamp | date:'H:mm, MM/dd/yyyy'}}</span>
                </div>
            </ui-gmap-window>
            <ui-gmap-window coords="mapOption.selected.coords" show="windowOptions.show" closeClick="closeClick()"
                            ng-if="isReportInfo('scans')">
                <div>
                    <span><b>Site:</b> {{mapOption.selected.site}} </span><br>
                    <span><b>Checkpoint:</b> {{mapOption.selected.cp}} </span><br>
                    <span><b>Date:</b> {{mapOption.selected.timestamp | date:'H:mm, MM/dd/yyyy'}}</span>
                </div>
            </ui-gmap-window>
        </ui-gmap-markers>
    </ui-gmap-google-map>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions