Commit 88b5869d authored by Simon's avatar Simon

Merge branch 'map-offset' into dev

parents 9b3fbec3 c4b6bd7c
...@@ -266,28 +266,28 @@ const mapStyles = [ ...@@ -266,28 +266,28 @@ const mapStyles = [
elementType: 'all', elementType: 'all',
stylers: [ stylers: [
{ {
'saturation': -92 saturation: -92
}, },
{ {
'lightness': -8 lightness: -8
}, },
{ {
'hue': '#0000ff' hue: '#004ed4'
} }
] ]
}, },
{ {
'featureType': 'water', featureType: 'water',
elementType: 'all', elementType: 'all',
'stylers': [ stylers: [
{ {
'saturation': -95 saturation: -95
}, },
{ {
'lightness': -25 lightness: -25
}, },
{ {
'hue': '#0000ff' hue: '#004ed4'
} }
] ]
} }
...@@ -337,6 +337,12 @@ function setMarkers (map, positions, focus) { ...@@ -337,6 +337,12 @@ function setMarkers (map, positions, focus) {
} }
map.fitBounds(bounds); map.fitBounds(bounds);
if (window.innerWidth > 1020) {
map.panBy(250, 0);
} else if (window.innerWidth > 959) {
map.panBy(180, 0);
}
} }
function initRegionsMap (node) { function initRegionsMap (node) {
...@@ -345,11 +351,15 @@ function initRegionsMap (node) { ...@@ -345,11 +351,15 @@ function initRegionsMap (node) {
return; return;
} }
const map = new window.google.maps.Map(node, { var options = {
mapTypeIds: [window.google.maps.MapTypeId.ROADMAP, window.google.maps.MapTypeId.HYBRID, 'biuro'] mapTypeIds: [window.google.maps.MapTypeId.ROADMAP, window.google.maps.MapTypeId.HYBRID, 'biuro']
}); };
var map = new window.google.maps.Map(node, options);
map.mapTypes.set('biuro', new window.google.maps.StyledMapType(mapStyles, { name: 'Biuro' })); var biuroMap = new window.google.maps.StyledMapType(mapStyles, { name: 'Biuro' });
map.mapTypes.set('biuro', biuroMap);
map.setMapTypeId('biuro'); map.setMapTypeId('biuro');
...@@ -374,11 +384,15 @@ function initDivisionsMap (node, data) { ...@@ -374,11 +384,15 @@ function initDivisionsMap (node, data) {
return; return;
} }
const map = new window.google.maps.Map(node, { var options = {
mapTypeIds: [window.google.maps.MapTypeId.ROADMAP, window.google.maps.MapTypeId.HYBRID, 'biuro'] mapTypeIds: [window.google.maps.MapTypeId.ROADMAP, window.google.maps.MapTypeId.HYBRID, 'biuro']
}); };
var map = new window.google.maps.Map(node, options);
var biuroMap = new window.google.maps.StyledMapType(mapStyles, { name: 'Biuro' });
map.mapTypes.set('biuro', new window.google.maps.StyledMapType(mapStyles, { name: 'Biuro' })); map.mapTypes.set('biuro', biuroMap);
map.setMapTypeId('biuro'); map.setMapTypeId('biuro');
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment