- Home
- O nas
- Oddziały
- Polska
B&R Warszawa
B&R Automatyka Przemysłowa
Flanders Business Park, ul. MarcinaFilsa 4
02-247 Warszaw
Polska
Telefon: +48 22 112 03 00
Mail:office.pl.warszawa@br-automation.com
' +'
%s%s
' + // adName / homepageName'
' +'%s ' + // adStreet'%s
' + // adHouseNo'%s ' + // adZipcode'%s
' + // adCity'%s
' + // adCountry'
' +'%s ' + // street'%s
' + // houseNo'%s ' + // zipcode'%s
' + // city'%s
' + // country'%s
' + // phone'%s
' + // fax'%s
' + // contactMail'%s
' + // webpage'Pomoc techniczna
' +'%s
' + // supportPhone'%s
' + // supportMail'%s
' + // supportWebpage'
' +'
' +'
';var bounds;if (window.useGoogleMap) {window.infowindow = new google.maps.InfoWindow();window.map = new google.maps.Map(document.getElementById('map'), {zoom: 7,center: new google.maps.LatLng(45, 15)});window.map.initialZoom = true;bounds = new google.maps.LatLngBounds();//google.maps.event.addListener(map, 'zoom_changed', limitZoom);//google.maps.event.addListener(map, 'bounds_changed', limitZoom);} else {if (!window.AMap) return;window.infowindow = new AMap.InfoWindow({offset: new AMap.Pixel(5, -35)});window.map = new AMap.Map('map', {center: new AMap.LngLat(121.394008, 31.164049), zoom: 7});bounds = [];}var currentLanguage = JSON.parse(document.getElementById('currentLanguage').innerHTML);var countryCodeArray = currentLanguage.lang.split("-"); window.countryCode = countryCodeArray.length > 1 ? countryCodeArray[1] : 'AT';var markers = [];for (var i = 0; i < window.addresses.length; i++) {markers.push(placeMarker(window.addresses[i], bounds, i));}if (window.useGoogleMap){google.maps.event.addListenerOnce(map, 'idle', function() {limitZoom();});}if (!centerMap) {fitMapBounds(bounds);}window.markers = markers;}function fitMapBounds(bounds) {if (!bounds) return;if (window.useGoogleMap) {map.fitBounds(bounds);} else {map.remove(map.getAllOverlays('polygon'));new AMap.Polygon({path: bounds,map: map,strokeOpacity: 0,fillOpacity: 0,bubble: true});var overlaysList = map.getAllOverlays('polygon');map.setFitView(overlaysList);}}function limitZoom() {var map = window.map;if (map.getZoom() > 7) {map.setZoom(7);}} function sanitizeWebsiteUrl(url) { if (url.indexOf('http') !== 0) { url = 'http://' + url; } if (url === 'http://' || url === 'https://') { url = ''; } return url; }function placeMarker(address, bounds, index) {var map = window.map;var countryCode = window.countryCode;var templateHTML = window.templateHTML;var infowindow = window.infowindow;var technicalSupportDisplay = 'none'; let supportWebpage = sanitizeWebsiteUrl(address.supportWebpage); let webpage = sanitizeWebsiteUrl(address.webpage); if (address.supportPhone || address.supportMail || supportWebpage) {technicalSupportDisplay = 'inline';} var infoBox = sprintf(templateHTML, address.adName, address.homepageName, address.adStreet, address.adHouseNo, address.adZipcode, address.adCity, address.adCountry,address.street, address.houseNo, address.zipcode, address.city, address.country, address.phone, address.fax, address.contactMail, address.contactMail, webpage, webpage, technicalSupportDisplay, address.supportPhone, address.supportMail, address.supportMail, supportWebpage, supportWebpage);var icon;switch (address.type) {case 'HQ':icon = '/typo3conf/ext/br_sitesetup/Resources/Public/Images/marker/map-marker-hq.png';break;case 'TB':icon = '/typo3conf/ext/br_sitesetup/Resources/Public/Images/marker/map-marker-tb.png';break;case 'VB':icon = '/typo3conf/ext/br_sitesetup/Resources/Public/Images/marker/map-marker-vb.png';break;case 'PA':icon = '/typo3conf/ext/br_sitesetup/Resources/Public/Images/marker/map-marker-pa.png';break;default:icon = '/typo3conf/ext/br_sitesetup/Resources/Public/Images/marker/map-marker-pa.png';}var marker;if (window.useGoogleMap) {var latLng = new google.maps.LatLng(address.latitude, address.longitude);if (centerMap && countryCode && countryCode.localeCompare(address.countryCode) == 0 && address.type.localeCompare("HQ") == 0) {map.setCenter(latLng);map.setZoom(7);}if (bounds) {bounds.extend(latLng);}marker = new google.maps.Marker({position: latLng,map: map,icon: icon, zIndex: index,});google.maps.event.addListener(marker, 'click', function () {infowindow.close(); // Close previously opened infowindowinfowindow.setContent(infoBox);infowindow.open(map, marker);});} else {var lngLat = new AMap.LngLat(address.longitude, address.latitude);marker = new AMap.Marker({icon: icon,position: lngLat});map.add(marker);if (bounds) {bounds.push([address.longitude, address.latitude]);}marker.on('click', function () {console.log(infowindow);infowindow.close(); // Close previously opened infowindowinfowindow.setContent(infoBox);infowindow.open(map, marker.getPosition());});}return marker;}// Data for the markers consisting of a name, a LatLng and a zIndex for the// order in which these markers should display on top of each other.function sprintf() {if (arguments.length < 2) {return arguments[0];}var args = arguments;var index = 1;return (args[0] + '').replace(/%((\d)\$)?([sd%])/g, function (match, group, pos) {if (match === '%%') {return '%';}if (typeof pos === 'undefined') {pos = index++;}if (pos in args && pos > 0) {return args[pos];} else {return match;}});}function initFilterMarkers() {if (typeof window.jQuery !== 'function') {setTimeout(initFilterMarkers, 100);return;}var jQuery = window.jQuery;var filterRegion = jQuery('#filter-region');var filterCountry = jQuery('#filter-country');var filterLocationType = jQuery('#filter-location-type');filterRegion.on('change', filterMarkers);filterCountry.on('change', filterMarkers);filterLocationType.on('change', filterMarkers);jQuery('#show-places-near-me').on('click', showPlacesNearMe);jQuery('#reset-filters').on('click', resetFilters);filterRegion.on('change', function () {var self = $(this);var selectedOption = self.children('option:selected');var dropdownMenu = filterCountry.closest('.bootstrap-select').find('ul.dropdown-menu');dropdownMenu.find('li').show();var countryOptions = filterCountry.find('option[data-continent!="' + selectedOption.attr('value') + '"]');if (!self.val()) {return;}// show only countries for that continentcountryOptions.each(function () {var countryOption = $(this);if (countryOption.attr('value') === '') {return;}dropdownMenu.find('li[data-original-index="' + countryOption.index() + '"]').hide();});// reset active country selection if it does not match the current selected continentvar selectedCountry = filterCountry.children('option:selected');if (selectedCountry.data('continent') !== self.val()) {filterCountry.val('');filterCountry.trigger('change');}});function filterMarkers() {var addresses = window.addresses;var filterRegionValue = filterRegion.val();var filterCountryValue = filterCountry.val();var filterLocationTypeValue = filterLocationType.val();var filteredAddresses = [];addresses.forEach(function (address) {var passed = true;if (filterLocationTypeValue && address.type !== filterLocationTypeValue) {passed = false;}if (filterCountryValue && address.countryCode !== filterCountryValue) {passed = false;}if (filterRegionValue && address.continent !== filterRegionValue) {passed = false;}if (passed) {filteredAddresses.push(address);}});window.markers.forEach(function (marker) {marker.setMap(null);});var bounds;if (window.useGoogleMap) {bounds = new google.maps.LatLngBounds();} else {bounds = [];}var newMarkers = [];filteredAddresses.forEach(function (address, index) {newMarkers.push(placeMarker(address, bounds, index));});window.markers = newMarkers;if (!filteredAddresses.length) {$('#no-results-info').show();return;} else {$('#no-results-info').hide();}fitMapBounds(bounds);limitZoom();}function showPlacesNearMe() {var self = jQuery(this);var wrapper = self.closest('.tx-br-address');wrapper.addClass('loading');if (window.placesNearMeFiltered) {filterMarkers();self.text(self.data('initial-text'));wrapper.removeClass('loading');window.placesNearMeFiltered = false;} else {if (navigator.geolocation) {navigator.geolocation.getCurrentPosition(function (position) {var pos = {lat: position.coords.latitude,lng: position.coords.longitude};var myLocation = new google.maps.LatLng(pos.lat, pos.lng);var bounds;if (window.useGoogleMap) {bounds = new google.maps.LatLngBounds();} else {bounds = [];}window.markers.forEach(function (marker) {var markerPosition;if (window.useGoogleMap) {markerPosition = new google.maps.LatLng(marker.position.lat(), marker.position.lng());} else {markerPosition = new google.maps.LatLng(marker.getPosition().lat, marker.getPosition().lng);}var distance = google.maps.geometry.spherical.computeDistanceBetween(myLocation, markerPosition) / 1000;// 150km radiusif (distance <= 150) {if (window.useGoogleMap) {bounds.extend(markerPosition);} else {bounds.push([marker.getPosition().lng, marker.getPosition().lat]);}} else {marker.setMap(null);}});fitMapBounds(bounds);self.text(self.data('switch-back'));wrapper.removeClass('loading');window.placesNearMeFiltered = true;}, function () {// browser location not allowedself.text(self.data('error-rights'));wrapper.removeClass('loading');});} else {// Browser doesn't support Geolocationself.text(self.data('error-browser'));wrapper.removeClass('loading');}}}function resetFilters() {filterRegion.val('');filterCountry.val('');filterLocationType.val('');filterRegion.trigger('change');filterCountry.trigger('change');filterLocationType.trigger('change');filterMarkers();}}initFilterMarkers();