var map; function initMap() { map = new google.maps.Map(document.getElementById('map'), { center: { lat: -23.550439, lng: -46.633912 }, zoom: ($(window).width()<640||$(window).height()<640?10:11), disableDefaultUI: true }); map.data.setStyle(function(feature) { return { title: feature.getProperty('name'), icon: 'https://web.safecar.net.br/sku/SCB_Web_map_icon.png', optimized: false }; }); map.setOptions({styles: [ { "featureType": "administrative", "elementType": "labels.text.fill", "stylers": [ { "color": "#444444" } ] }, { "featureType": "administrative.province", "elementType": "labels.text.fill", "stylers": [ { "visibility": "on" } ] }, { "featureType": "administrative.locality", "elementType": "labels.text.fill", "stylers": [ { "saturation": "5" } ] }, { "featureType": "administrative.neighborhood", "elementType": "labels.text", "stylers": [ { "color": "#878787" }, { "visibility": "off" } ] }, { "featureType": "administrative.neighborhood", "elementType": "labels.text.fill", "stylers": [ { "visibility": "on" }, { "color": "#898989" } ] }, { "featureType": "landscape", "elementType": "all", "stylers": [ { "color": "#f2f2f2" } ] }, { "featureType": "poi", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.park", "elementType": "geometry.fill", "stylers": [ { "visibility": "on" }, { "hue": "#c3ff00" }, { "saturation": "0" }, { "lightness": "-17" }, { "gamma": "0.84" } ] }, { "featureType": "poi.park", "elementType": "geometry.stroke", "stylers": [ { "visibility": "off" } ] }, { "featureType": "road", "elementType": "all", "stylers": [ { "saturation": -100 }, { "lightness": 45 } ] }, { "featureType": "road.highway", "elementType": "all", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "road.highway", "elementType": "geometry", "stylers": [ { "visibility": "simplified" }, { "color": "#a2a2a2" } ] }, { "featureType": "road.highway", "elementType": "labels.text", "stylers": [ { "color": "#555555" } ] }, { "featureType": "road.arterial", "elementType": "labels.text", "stylers": [ { "hue": "#ff0000" } ] }, { "featureType": "road.arterial", "elementType": "labels.icon", "stylers": [ { "visibility": "off" } ] }, { "featureType": "transit", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "water", "elementType": "all", "stylers": [ { "color": "#46bcec" }, { "visibility": "on" } ] } ] }); map.data.addGeoJson(locations); var infoWindow = new google.maps.InfoWindow({pixelOffset: new google.maps.Size(0, -50)}); map.data.addListener('click', function(event) { $.post('/sku/stations-map', { id: event.feature.getProperty("id"), code: event.feature.getProperty("code") }, function(data) { if (data) { infoWindow.setContent(data); infoWindow.setPosition(event.latLng); infoWindow.open(map); } }); }) } var locations = { type: 'FeatureCollection', features: [{type:'Feature',geometry:{type:'Point',coordinates:[-48.372059,-1.3318014]},properties:{name:'Drecio',id:752,code:'b75c5799'}},{type:'Feature',geometry:{type:'Point',coordinates:[-50.9162488,-17.7879476]},properties:{name:'PIT STOP SERVICOS LTDA',id:817,code:'8dc0374a'}},{type:'Feature',geometry:{type:'Point',coordinates:[-48.2742422,-18.9015367]},properties:{name:'MT telemetria',id:771,code:'3c9b27b5'}},{type:'Feature',geometry:{type:'Point',coordinates:[-40.07358,-19.3198686]},properties:{name:'JR Rastreadores',id:783,code:'5a87a943'}},{type:'Feature',geometry:{type:'Point',coordinates:[-43.9622651,-19.7213161]},properties:{name:'Seu Instalador BH',id:769,code:'55bc405b'}},{type:'Feature',geometry:{type:'Point',coordinates:[-47.9092044,-19.7588614]},properties:{name:'Carlos Eduardo',id:789,code:'84d2b010'}},{type:'Feature',geometry:{type:'Point',coordinates:[-47.9092044,-19.7588614]},properties:{name:'Carlos Eduardo de Freitas ',id:812,code:'0935539a'}},{type:'Feature',geometry:{type:'Point',coordinates:[-40.2656727,-20.2132968]},properties:{name:'Visão Vila Velha Rastreamento',id:816,code:'cc4a4b5f'}},{type:'Feature',geometry:{type:'Point',coordinates:[-54.6477813,-20.4899297]},properties:{name:'Andre ',id:774,code:'fc21f094'}},{type:'Feature',geometry:{type:'Point',coordinates:[-49.388822,-20.808002]},properties:{name:'MANDIOCA',id:759,code:'f8e9db80'}},{type:'Feature',geometry:{type:'Point',coordinates:[-49.3765372,-20.8126993]},properties:{name:'2 sat',id:763,code:'6c7d3b47'}},{type:'Feature',geometry:{type:'Point',coordinates:[-50.4026608,-21.2111402]},properties:{name:'Auto eletrico Premium ',id:772,code:'aee9ae0b'}},{type:'Feature',geometry:{type:'Point',coordinates:[-48.2228571,-21.3643365]},properties:{name:'RastreMais',id:815,code:'3c1cf0c7'}},{type:'Feature',geometry:{type:'Point',coordinates:[-45.2562592,-21.6973293]},properties:{name:'Elvis ',id:770,code:'e30442ad'}},{type:'Feature',geometry:{type:'Point',coordinates:[-47.9022009,-22.0291981]},properties:{name:'EXTREME SOM',id:761,code:'72254153'}},{type:'Feature',geometry:{type:'Point',coordinates:[-47.3819962,-22.1775611]},properties:{name:'SENADA SOM ',id:748,code:'2f880011'}},{type:'Feature',geometry:{type:'Point',coordinates:[-42.5355149,-22.3106419]},properties:{name:'R.w.tuning som e acessórios ',id:819,code:'3eb71948'}},{type:'Feature',geometry:{type:'Point',coordinates:[-47.2050934,-22.4908165]},properties:{name:'DECASON ',id:740,code:'e841617e'}},{type:'Feature',geometry:{type:'Point',coordinates:[-47.4132269,-22.5446463]},properties:{name:'Junior Auto Som',id:757,code:'5d9ec362'}},{type:'Feature',geometry:{type:'Point',coordinates:[-50.3946949,-22.6605718]},properties:{name:'SYSTEM SOM',id:743,code:'3dc7ab50'}},{type:'Feature',geometry:{type:'Point',coordinates:[-46.9848946,-22.7042274]},properties:{name:'ESTAÇÃO DO SOM ',id:746,code:'b100f530'}},{type:'Feature',geometry:{type:'Point',coordinates:[-47.2994539,-22.7443594]},properties:{name:'ALLAM ',id:753,code:'16c6dfb9'}},{type:'Feature',geometry:{type:'Point',coordinates:[-47.3049301,-22.7557245]},properties:{name:'AMERI',id:750,code:'e1829b8f'}},{type:'Feature',geometry:{type:'Point',coordinates:[-47.1766956,-22.8279433]},properties:{name:'Thiago Dellacruci',id:818,code:'d985f81d'}},{type:'Feature',geometry:{type:'Point',coordinates:[-47.1766956,-22.8279433]},properties:{name:'Thiago Dellacruci',id:825,code:'dd50fb6d'}},{type:'Feature',geometry:{type:'Point',coordinates:[-47.196448,-22.8417085]},properties:{name:'Orbisat',id:767,code:'e28570e0'}},{type:'Feature',geometry:{type:'Point',coordinates:[-48.4625575,-22.8515629]},properties:{name:'Nelson ',id:764,code:'7beb43d7'}},{type:'Feature',geometry:{type:'Point',coordinates:[-46.5254104,-22.9155899]},properties:{name:'JEFERSON OLIVEIRA DE CARVALHO',id:739,code:'d82bbda9'}},{type:'Feature',geometry:{type:'Point',coordinates:[-43.3446532,-22.937508]},properties:{name:'Marcos Roberto Cavalcante da Fonseca',id:820,code:'080f7341'}},{type:'Feature',geometry:{type:'Point',coordinates:[-47.3152302,-22.9470417]},properties:{name:'EDINHO SOM ',id:741,code:'d3677c6b'}},{type:'Feature',geometry:{type:'Point',coordinates:[-47.2079588,-23.0882014]},properties:{name:'RICARDO LIMA ',id:787,code:'4e025eea'}},{type:'Feature',geometry:{type:'Point',coordinates:[-48.9167192,-23.1087286]},properties:{name:'Murilo Henrique Alves de Lima',id:810,code:'7bdbaeed'}},{type:'Feature',geometry:{type:'Point',coordinates:[-46.5547858,-23.1392717]},properties:{name:'REDSOM',id:745,code:'29b8b833'}},{type:'Feature',geometry:{type:'Point',coordinates:[-47.7481761,-23.1748278]},properties:{name:'ZE SOM',id:742,code:'1db95112'}},{type:'Feature',geometry:{type:'Point',coordinates:[-47.2985187,-23.2830424]},properties:{name:'CONECTA ',id:760,code:'1a78937e'}},{type:'Feature',geometry:{type:'Point',coordinates:[-47.6822277,-23.3548389]},properties:{name:'ELIAS ',id:749,code:'2ec6992d'}},{type:'Feature',geometry:{type:'Point',coordinates:[-46.6659147,-23.5025842]},properties:{name:'TDA ACESSÓRIOS ',id:870,code:'d28db41e'}},{type:'Feature',geometry:{type:'Point',coordinates:[-46.5953513,-23.5073583]},properties:{name:'Guia Norte - Loja 01',id:301,code:'2d0b42a1'}},{type:'Feature',geometry:{type:'Point',coordinates:[-46.5957865,-23.5094606]},properties:{name:'Guia Norte - Loja 02',id:501,code:'f0d29988'}},{type:'Feature',geometry:{type:'Point',coordinates:[-46.4930683,-23.5426447]},properties:{name:'Filma Som acessórios automotivos',id:131,code:'20bdf7d4'}},{type:'Feature',geometry:{type:'Point',coordinates:[-46.8838322,-23.5480812]},properties:{name:'Next Rastrek',id:114,code:'cecc9d9d'}},{type:'Feature',geometry:{type:'Point',coordinates:[-46.311941,-23.5519098]},properties:{name:'New sound',id:455,code:'7c03f914'}},{type:'Feature',geometry:{type:'Point',coordinates:[-46.5549921,-23.5749976]},properties:{name:'Kip Sound',id:457,code:'21fdd67c'}},{type:'Feature',geometry:{type:'Point',coordinates:[-46.6918538,-23.6044717]},properties:{name:'Safecar Serviços',id:458,code:'18c2556f'}},{type:'Feature',geometry:{type:'Point',coordinates:[-46.5599645,-23.6694578]},properties:{name:'Proton Instalaçoes',id:469,code:'f7a18e12'}},{type:'Feature',geometry:{type:'Point',coordinates:[-46.5535432,-23.706412]},properties:{name:'Belocar Auto Sound',id:456,code:'9b7883c8'}},{type:'Feature',geometry:{type:'Point',coordinates:[-52.3841489,-24.0422182]},properties:{name:'Marcelo',id:766,code:'b8b9f76c'}},{type:'Feature',geometry:{type:'Point',coordinates:[-46.7911891,-24.1798848]},properties:{name:' Rodrigo Zanardini Ferreira da Silva',id:824,code:'8843d737'}},{type:'Feature',geometry:{type:'Point',coordinates:[-51.4617307,-25.3745608]},properties:{name:'Delcio',id:773,code:'d1a0fe96'}},{type:'Feature',geometry:{type:'Point',coordinates:[-49.5234947,-26.2478268]},properties:{name:'Auto Eletrico MS',id:768,code:'d576a04a'}},{type:'Feature',geometry:{type:'Point',coordinates:[-48.8337021,-26.3744571]},properties:{name:'LS Som',id:747,code:'8d8a4aea'}},{type:'Feature',geometry:{type:'Point',coordinates:[-51.1443679,-29.770529]},properties:{name:'Talis leite felles',id:781,code:'8b26821d'}},{type:'Feature',geometry:{type:'Point',coordinates:[-34.8977413,-7.9524482]},properties:{name:'AUTO TECH',id:777,code:'3ad02def'}},{type:'Feature',geometry:{type:'Point',coordinates:[-34.8549252,-8.0063451]},properties:{name:'Wendell',id:775,code:'7783d205'}},{type:'Feature',geometry:{type:'Point',coordinates:[-34.8549252,-8.0063451]},properties:{name:'Wendell',id:776,code:'d4de371a'}},{type:'Feature',geometry:{type:'Point',coordinates:[-34.8829629,-8.0577401]},properties:{name:'EDESIO',id:755,code:'d33d737f'}},{type:'Feature',geometry:{type:'Point',coordinates:[-56.0889236,-9.8698482]},properties:{name:'CARLOS',id:751,code:'400bb417'}}] }