Angular google maps

Size
2,547 Kb
Views
6,072

How do I make an angular google maps?

What is a angular google maps? How do you make a angular google maps? This script and codes were developed by Edward R Haase on 13 January 2023, Friday.

Angular google maps Previews

Angular google maps - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Angular google maps</title> <script src="https://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel='stylesheet prefetch' href='http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div ng-app='app' ng-controller='MyCtrl'> <google-map center="map.center" zoom="map.zoom" events='map.events' draggable='true'></google-map> <div class='locbar'> <pre class='col-md-3'> center latitude: {{map.center.latitude}} center longitude: {{map.center.longitude}} zoom: {{map.zoom}} </pre> <pre class='col-md-4'> NorthEast lat: {{bounds.ne.lat}}, lng: {{bounds.ne.lng}} SouthWest lat: {{bounds.sw.lat}}, lng: {{bounds.sw.lng}} </pre> <div class='well col-md-5'> </div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.js'></script>
<script src='http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js'></script>
<script src='http://maps.googleapis.com/maps/api/js?sensor=false'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.20/angular.js'></script>
<script src='http://cdn.jsdelivr.net/angular.google-maps/1.1.0/angular-google-maps.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Angular google maps - Script Codes CSS Codes

.angular-google-map-container { position: absolute; top: 0px; left: 0px; bottom: 80px; // bottom: 0px; right: 0px;
}
.locbar { position: fixed; bottom: 0px; width: 100%; margin: 0px; height: 80px;
}
pre { height: 100%; overflow: hidden; }
.locbar > div { height: 100%; }

Angular google maps - Script Codes JS Codes

var app = angular.module('app', ['google-maps']);
function MyCtrl($scope) { $scope.map = { center: { latitude: 45, longitude: -73 }, zoom: 8 }; $scope.draggable = true; /** $scope.$apply is neccesary for angular changes here */ $scope.map.events = { mouseover: function(m) { }, // console.log("mouseover", m); }, mousemove: function(m) { }, //console.log('mousemove', m.x, m.y); }, rightclick: function() { }, tilesloaded: function(map) { }, zoom_changed: function(map) { /* map.zoom */ }, bounds_changed: function(map) { /* fires when dragging or resizing */ $scope.$apply(function() { $scope.map.bounds = map.getBounds(); $scope.bounds = { ne: { lat: $scope.map.bounds.getNorthEast().lat(), lng: $scope.map.bounds.getNorthEast().lng() }, sw: { lat: $scope.map.bounds.getSouthWest().lat(), lng: $scope.map.bounds.getSouthWest().lng() } }; /** consider dynamically loading data here */ }); } };
}
Angular google maps - Script Codes
Angular google maps - Script Codes
Home Page Home
Developer Edward R Haase
Username ehaase
Uploaded January 13, 2023
Rating 3
Size 2,547 Kb
Views 6,072
Do you need developer help for Angular google maps?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Edward R Haase (ehaase) Script Codes
Create amazing art & images with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!