📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
firmarehberipro.demodesign.com.tr
/
assets
/
scripts
📝
maps.js
← Geri Dön
var infoBox_ratingType = 'star-rating'; (function($) { "use strict"; var map = document.getElementById('map'); if (typeof(map) != 'undefined' && map != null) { google.maps.event.addDomListener(window, 'load', mainMap); } function singleListingMap() { var myLatlng = new google.maps.LatLng({ lng: $('#singleListingMap').data('longitude'), lat: $('#singleListingMap').data('latitude'), }); var single_map = new google.maps.Map(document.getElementById('singleListingMap'), { zoom: 15, center: myLatlng, scrollwheel: false, zoomControl: false, mapTypeControl: false, scaleControl: false, panControl: false, navigationControl: false, streetViewControl: false, styles: [{ "featureType": "poi", "elementType": "labels.text.fill", "stylers": [{ "color": "#747474" }, { "lightness": "23" }] }, { "featureType": "poi.attraction", "elementType": "geometry.fill", "stylers": [{ "color": "#f38eb0" }] }, { "featureType": "poi.government", "elementType": "geometry.fill", "stylers": [{ "color": "#ced7db" }] }, { "featureType": "poi.medical", "elementType": "geometry.fill", "stylers": [{ "color": "#ffa5a8" }] }, { "featureType": "poi.park", "elementType": "geometry.fill", "stylers": [{ "color": "#c7e5c8" }] }, { "featureType": "poi.place_of_worship", "elementType": "geometry.fill", "stylers": [{ "color": "#d6cbc7" }] }, { "featureType": "poi.school", "elementType": "geometry.fill", "stylers": [{ "color": "#c4c9e8" }] }, { "featureType": "poi.sports_complex", "elementType": "geometry.fill", "stylers": [{ "color": "#b1eaf1" }] }, { "featureType": "road", "elementType": "geometry", "stylers": [{ "lightness": "100" }] }, { "featureType": "road", "elementType": "labels", "stylers": [{ "visibility": "off" }, { "lightness": "100" }] }, { "featureType": "road.highway", "elementType": "geometry.fill", "stylers": [{ "color": "#ffd4a5" }] }, { "featureType": "road.arterial", "elementType": "geometry.fill", "stylers": [{ "color": "#ffe9d2" }] }, { "featureType": "road.local", "elementType": "all", "stylers": [{ "visibility": "simplified" }] }, { "featureType": "road.local", "elementType": "geometry.fill", "stylers": [{ "weight": "3.00" }] }, { "featureType": "road.local", "elementType": "geometry.stroke", "stylers": [{ "weight": "0.30" }] }, { "featureType": "road.local", "elementType": "labels.text", "stylers": [{ "visibility": "on" }] }, { "featureType": "road.local", "elementType": "labels.text.fill", "stylers": [{ "color": "#747474" }, { "lightness": "36" }] }, { "featureType": "road.local", "elementType": "labels.text.stroke", "stylers": [{ "color": "#e9e5dc" }, { "lightness": "30" }] }, { "featureType": "transit.line", "elementType": "geometry", "stylers": [{ "visibility": "on" }, { "lightness": "100" }] }, { "featureType": "water", "elementType": "all", "stylers": [{ "color": "#d2e7f7" }] }] }); $('#streetView').click(function(e) { e.preventDefault(); single_map.getStreetView().setOptions({ visible: true, position: myLatlng }); }); var zoomControlDiv = document.createElement('div'); var zoomControl = new ZoomControl(zoomControlDiv, single_map); function ZoomControl(controlDiv, single_map) { zoomControlDiv.index = 1; single_map.controls[google.maps.ControlPosition.RIGHT_CENTER].push(zoomControlDiv); controlDiv.style.padding = '5px'; var controlWrapper = document.createElement('div'); controlDiv.appendChild(controlWrapper); var zoomInButton = document.createElement('div'); zoomInButton.className = "custom-zoom-in"; controlWrapper.appendChild(zoomInButton); var zoomOutButton = document.createElement('div'); zoomOutButton.className = "custom-zoom-out"; controlWrapper.appendChild(zoomOutButton); google.maps.event.addDomListener(zoomInButton, 'click', function() { single_map.setZoom(single_map.getZoom() + 1); }); google.maps.event.addDomListener(zoomOutButton, 'click', function() { single_map.setZoom(single_map.getZoom() - 1); }); } var singleMapIco = "<i class='" + $('#singleListingMap').data('map-icon') + "'></i>"; new CustomMarker(myLatlng, single_map, { marker_id: '1' }, singleMapIco); } var single_map = document.getElementById('singleListingMap'); if (typeof(single_map) != 'undefined' && single_map != null) { google.maps.event.addDomListener(window, 'load', singleListingMap); } function CustomMarker(latlng, map, args, markerIco) { this.latlng = latlng; this.args = args; this.markerIco = markerIco; this.setMap(map); } CustomMarker.prototype = new google.maps.OverlayView(); CustomMarker.prototype.draw = function() { var self = this; var div = this.div; if (!div) { div = this.div = document.createElement('div'); div.className = 'map-marker-container'; div.innerHTML = '<div class="marker-container">' + '<div class="marker-card">' + '<div class="front face">' + self.markerIco + '</div>' + '<div class="back face">' + self.markerIco + '</div>' + '<div class="marker-arrow"></div>' + '</div>' + '</div>' google.maps.event.addDomListener(div, "click", function(event) { $('.map-marker-container').removeClass('clicked infoBox-opened'); google.maps.event.trigger(self, "click"); $(this).addClass('clicked infoBox-opened'); }); if (typeof(self.args.marker_id) !== 'undefined') { div.dataset.marker_id = self.args.marker_id; } var panes = this.getPanes(); panes.overlayImage.appendChild(div); } var point = this.getProjection().fromLatLngToDivPixel(this.latlng); if (point) { div.style.left = (point.x) + 'px'; div.style.top = (point.y) + 'px'; } }; CustomMarker.prototype.remove = function() { if (this.div) { this.div.parentNode.removeChild(this.div); this.div = null; $(this).removeClass('clicked'); } }; CustomMarker.prototype.getPosition = function() { return this.latlng; }; })(this.jQuery);
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula