ionic-Material Design , Codecanyon
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<!--View Information-->
|
||||
<!--View name : Android Map Connect-->
|
||||
<!--Controller name : androidMapConnectCtrl-->
|
||||
<!--Controller path : www/templates/map-and-location/android-map-connect/js/controllers.js-->
|
||||
<!--State name : app.androidMapConnect-->
|
||||
<!--URL : #app/androidMapConnect-->
|
||||
|
||||
<ion-view title="Android Map Connect">
|
||||
<!--map and location section-->
|
||||
<ion-content id="map-and-location">
|
||||
<!--header section-->
|
||||
<form>
|
||||
<div>
|
||||
<i class="fa fa-map md-primary-color"></i>
|
||||
</div>
|
||||
<div class="sub-header">Map Connect for Android</div>
|
||||
<br/>
|
||||
</form><!--end header section-->
|
||||
|
||||
<!--map input option section-->
|
||||
<div class="map-input-option">
|
||||
<md-input-container md-no-float="">
|
||||
<input ng-model="destinationLocation" placeholder="Destination Location lat,long">
|
||||
</md-input-container>
|
||||
<a class="md-raised social-button md-button md-default-theme material-background"
|
||||
ng-click="openMap(destinationLocation)">
|
||||
Connect to Google Map
|
||||
</a>
|
||||
|
||||
<!--footer section-->
|
||||
<div class="footer">
|
||||
This feature can use on Android devise only.
|
||||
</div><!--end footer section-->
|
||||
</div><!--end map input option section-->
|
||||
</ion-content><!--map and location section-->
|
||||
</ion-view>
|
||||
@@ -0,0 +1,31 @@
|
||||
// Controller of google androidMapConnect page.
|
||||
// You can learn more about google map for Android at:
|
||||
// https://developers.google.com/maps/documentation/android-api/intents?hl=en#display_a_map
|
||||
// at Display a map section.
|
||||
appControllers.controller('androidMapConnectCtrl', function ($scope) {
|
||||
|
||||
// initialForm is the first activity in the controller.
|
||||
// It will initial all variable data and let the function works when page load.
|
||||
$scope.initialForm = function () {
|
||||
//destinationLocation is latitude,longitude of the destination location.
|
||||
$scope.destinationLocation = "-37.817364,144.955464";
|
||||
};// End initialForm
|
||||
|
||||
// openMap is for open Google Map application.
|
||||
// Parameter :
|
||||
// targetDestinationLocation = latitude,longitude of the destination location.
|
||||
$scope.openMap = function (targetDestinationLocation) {
|
||||
|
||||
// window.open is to link to URL.
|
||||
// The format is geo:?q=targetDestinationLocation(latitude,longitude)&z=15(Specifies the zoom level of the map).
|
||||
// '_system' is for open map application
|
||||
window.open('geo:?q=' + targetDestinationLocation + '&z=15', '_system');
|
||||
// If you would like to custom map you can use this parameter below:
|
||||
// latitude and longitude set the center point of the map.
|
||||
// z optionally sets the initial zoom level of the map. Accepted values range from 0 (the whole world) to 21 (individual buildings).
|
||||
// The upper limit can vary depending on the map data available at the selected location.
|
||||
};// End openMap
|
||||
|
||||
$scope.initialForm();
|
||||
|
||||
});// End androidMapConnectCtrl controller.
|
||||
Reference in New Issue
Block a user