How to use the ionic-native.GoogleMapsLatLng function in ionic-native

To help you get started, we’ve selected a few ionic-native examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github RioBus / ionic-app / src / components / maps / controller.ts View on Github external
import { HIDE_TRAJECTORY_KEY, ENABLE_SWAP_DIRECTION } from '../../const';
import { GoogleMap, GoogleMapsEvent, GoogleMapsLatLng } from 'ionic-native';
import { Platform } from 'ionic-angular';
import { Component, OnChanges, OnDestroy } from '@angular/core';
import { Bus } from '../../models/bus';
import { Line, Itinerary } from '../../models/itinerary';
import { MarkerController } from './marker';
import { PreferencesManager } from '../../managers/preferences';

// Configuration for the map available resources and presentation
const mapConfig: any =  {
    mapType: 'MAP_TYPE_NORMAL',
    controls: { compass: true, myLocationButton: true, indoorPicker: false, zoom: false },
    camera: { latLng: new GoogleMapsLatLng(-22.9083, -43.1964), zoom: 12 },
};

/**
 * Represents the  HTML component.
 * @class {GoogleMapsComponent}
 */
@Component({
    selector: 'google-maps',
    templateUrl: 'template.html',
    inputs: ['markers', 'line', 'trajectory'],
})
export class GoogleMapsComponent implements OnChanges, OnDestroy {

    private map: GoogleMap;
    private markers: Bus[];
    private trajectory: Itinerary;
github aaronksaunders / ionic2GMapNative / app / pages / home / home.ts View on Github external
this._zone.run(() => {
          let myPosition = new GoogleMapsLatLng(38.9072, -77.0369);
          console.log("My position is", myPosition);
          this.map.animateCamera({ target: myPosition, zoom: 10 });
        });
github RioBus / ionic-app / src / components / maps / marker.ts View on Github external
private getMarkerData(bus: Bus): GoogleMapsMarkerOptions {
        return {
            position: new GoogleMapsLatLng(bus.Latitude, bus.Longitude),
            icon: { url: this.getIconPath(bus.Timestamp), size: { width: BusIcon.WIDTH, height: BusIcon.HEIGHT } },
            title: this.formatInfoWindow(bus),
        };
    }
github RioBus / ionic-app / src / components / maps / marker.ts View on Github external
private getMarkerSpotData(spot: Spot, returning: boolean, color: string): GoogleMapsMarkerOptions {
        let obj: any = { position: new GoogleMapsLatLng(spot.Latitude, spot.Longitude) };
        obj.title = (!returning) ? 'PONTO INICIAL' : 'PONTO FINAL';
        obj.icon = color;
        return obj;
    }
github Lacka90 / ionic-photo-maps / src / pages / maps / maps.ts View on Github external
const bounds = filtered.map((coord: Coordinates) => {
              return new GoogleMapsLatLng(coord.latitude, coord.longitude);
            });
github RioBus / ionic-app / src / components / maps / marker.ts View on Github external
private updatePosition(bus: Bus): void {
        this.markers[bus.Order].setPosition(new GoogleMapsLatLng(bus.Latitude, bus.Longitude));
    }