File: D:/HostingSpaces/SBogers10/tandartsmaas.komma.pro/wwwroot/js/app/modules/googleMaps.js
define(['modules/googleMaps'],function()
{
if(typeof(google) != "undefined")
{
var mapTitle = 'Tandarts Maas';
var mapLocation = new google.maps.LatLng(51.269043,5.5731614);
var markerLocation = new google.maps.LatLng(51.269043,5.5731614);
var marker;
var map;
var contentString = '' +
'<div class="info-window-content">' +
'<span class="title">Tandarts Maas</span><br />' +
'<a href="https://www.google.nl/maps/place/Nieuwstraat+59,+6021+HR+Budel/@51.269043,5.5731614,17z/data=!3m1!4b1!4m2!3m1!1s0x47c72bbb7b45f6e7:0x7def8bae2b7ae91f" target="_blank">' +
'Bekijk in Google Maps' +
'</a>' +
'</div>';
var infoWindow = new google.maps.InfoWindow({
content: contentString,
disableAutoPan: true,
flat: true
});
}
return{
initialize : function()
{
if($('#map_canvas').size() && typeof(google) != "undefined")
{
var styles = [
{
stylers: [
{ hue: "#0D57C1" },
{ gamma: 1.09 },
{ saturation: -63 },
{ lightness: 3 }
]
}, {
featureType: "road",
elementType: "geometry",
stylers: [
{ lightness: 100 },
{ visibility: "simplified" }
]
}, {
featureType: "road",
elementType: "labels",
stylers: [
{ visibility: "on" },
{ saturation: -100 }
]
}
];
// Create a new StyledMapType object, passing it the array of styles,
// as well as the name to be displayed on the map type control.
var styledMap = new google.maps.StyledMapType(styles,{ name: "Styled Map" });
var mapOptions = {
zoom: 15,
mapTypeId: google.maps.MapTypeId.ROADMAP,
disableDefaultUI: true,
center: mapLocation,
mapTypeControlOptions: {
mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'map_style']
}
};
map = new google.maps.Map(document.getElementById("map_canvas"),mapOptions);
//Associate the styled map with the MapTypeId and set it to display.
map.mapTypes.set('map_style', styledMap);
map.setMapTypeId('map_style');
marker = new google.maps.Marker({
map: map,
draggable: true,
title: mapTitle,
position: markerLocation
});
//infoWindow.open(map,marker);
google.maps.event.addListener(marker, 'click', function () {
infoWindow.open(map, marker);
});
google.maps.event.addListener(infoWindow, "domready", function () {
setTimeout(function () {
$("img[src$='iws3.png']").hide();
}, 80);
});
}
}
}
});