Erste Funktionalität der Menükarte per GET/POST, keine API; Umstrukturierung der Tabelle als Bootstrap-div; HTML/CSS-Cleanup
This commit is contained in:
0
public/js/angular-directives.js
vendored
Normal file
0
public/js/angular-directives.js
vendored
Normal file
32
public/js/angular-init.js
vendored
Normal file
32
public/js/angular-init.js
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
var app = angular.module('myApp', []);
|
||||
app.directive('rrMap', function() {
|
||||
return {
|
||||
restrict: 'A',
|
||||
template: '',
|
||||
link: function(scope, elem, attrs) {
|
||||
function init_map() {
|
||||
var coords = attrs.rrMap.split(", ");
|
||||
var var_location = new google.maps.LatLng(parseFloat(coords[0]), parseFloat(coords[1]));
|
||||
|
||||
var var_mapoptions = {
|
||||
center: var_location,
|
||||
zoom: 14
|
||||
};
|
||||
|
||||
var var_marker = new google.maps.Marker({
|
||||
position: var_location,
|
||||
map: var_map,
|
||||
title:"Map"});
|
||||
|
||||
var var_map = new google.maps.Map(elem[0], var_mapoptions);
|
||||
|
||||
var_marker.setMap(var_map);
|
||||
|
||||
}
|
||||
|
||||
console.log(elem[0].style);
|
||||
elem[0].style.minHeight = '400px';
|
||||
google.maps.event.addDomListener(window, 'load', init_map);
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user