Skip to content

null-none/ionic-native-google-maps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ionicNativeGoogleMaps

Directive for render native google maps for ionic

Bower version

Install

cordova plugin add cordova-plugin-googlemaps --variable API_KEY_FOR_ANDROID="YOUR_ANDROID_API_KEY_IS_HERE" --variable API_KEY_FOR_IOS="YOUR_IOS_API_KEY_IS_HERE"
bower install ionic-native-google-maps

Example

...
  <script src="lib/ionic-native-google-maps/ionicNativeGoogleMaps.js"></script>
...
$scope.lat = 43.2312;
$scope.lng = 12.2344;
$scope.markers = [
  {
    title: 'Test',
    id: 1,
    latitude: 43.2312,
    longitude: 12.2344,
    visible: true,
    icon: 'img/test.png'
  }
]
$scope.map = {
  center: {
    latitude: 43.2312,
    longitude: 12.2344,
  },
  zoom: 16,
};
<div native-google-map
     data-latitude="{{map.center.latitude}}"
     data-longitude="{{map.center.longitude}}"
     data-zoom="{{map.zoom}}"
     height="100%">
  <div native-google-map-marker ng-repeat="marker in markers"
                                data-latitude="{{marker.latitude}}"
                                data-id="{{marker.id}}"
                                data-longitude="{{marker.longitude}}"
                                data-icon="{{marker.icon}}"
                                data-visible="{{marker.visible}}"
                                data-title="{{marker.title}}">
  </div>
</div>

License

MIT

Donation Button

Donate

About

Directive for render native google maps for ionic

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published