lib/entity.js
function convertGeoPoints() {
                if (!{}.hasOwnProperty.call(this.schema.__meta, 'geoPointsProps')) {
                    return;
                }

                this.schema.__meta.geoPointsProps.forEach((property) => {
                    if ({}.hasOwnProperty.call(_this.entityData, property)
                        && _this.entityData[property] !== null
                        && _this.entityData[property].constructor.name !== 'GeoPoint') {
                        _this.entityData[property] = _this.gstore.ds.geoPoint(_this.entityData[property]);
                    }
                });
            }
function convertGeoPoints() {
                if (!{}.hasOwnProperty.call(this.schema.__meta, 'geoPointsProps')) {
                    return;
                }

                this.schema.__meta.geoPointsProps.forEach((property) => {
                    if ({}.hasOwnProperty.call(_this.entityData, property)
                        && _this.entityData[property] !== null
                        && _this.entityData[property].constructor.name !== 'GeoPoint') {
                        _this.entityData[property] = _this.gstore.ds.geoPoint(_this.entityData[property]);
                    }
                });
            }
function convertGeoPoints ( ) { if ( ! { } . hasOwnProperty . call ( this . schema . __meta , 'geoPointsProps' ) ) { return ; } this . schema . __meta . geoPointsProps . forEach ( ( property ) => { if ( { } . hasOwnProperty . call ( _this . entityData , property ) && _this . entityData [ property ] !== null && _this . entityData [ property ] . constructor . name !== 'GeoPoint' ) { _this . entityData [ property ] = _this . gstore . ds . geoPoint ( _this . entityData [ property ] ) ; } } ) ; }
If the entityData has some property of type 'geoPoint'
and its value is an js object with "latitude" and "longitude"
we convert it to a datastore GeoPoint.
If the entityData has some property of type geoPoint and its value is an js object with latitude and longitude we convert it to a datastore GeoPoint .