function initialize() {
// Multiple Markers
var markers = [
include("c_panel/functions.php");
include("c_panel/config.php");
$Sql5 = "select * from articles_all_lis
where cat_all='5' ORDER BY id desc limit 5";
$Result5 = mysql_query($Sql5);
while ($Row = mysql_fetch_array($Result5))
{
$id25=$Row[id];
$name25=$Row[name];
$wsf25=$Row[wsf];
$name_cus_a=$Row[name_cus_a];
$name_cus_b=$Row[name_cus_b];
$cat_all25=$Row[cat_all];
$cat25=$Row[cat];
$pic25=$Row[pic1];
$name_cus_a25=$Row[name_cus_a];
$katebp=$Row[kateb];
$name_lestp=$Row[name_lest];
$longup=$Row[longu];
$latup=$Row[latu];
$radiusup=$Row[radiusu];
$locationup=$Row[locationu];
$locationutop=$Row[locationuto];
$wsf25=mb_substr($wsf25, 0, 800, "utf-8");
if($lang=='en')
{
$namess1="$name25";
$wsfss1="$wsf251";
}
else {
$namess1="$katebp";
$wsfss1="$wsfto251";
}
if($pic25!='')
{
$pic2x5="pic_ar/$pic25";
}
else
{
$pic2x5="";
}
$rr=$rr+1;
?>
['', ],
}
?>
['', ]
];
// Info Window Content
var infoWindowContent = [
$Sql51 = "select * from articles_all_lis
where cat_all='5' ORDER BY id desc limit 5";
$Result51 = mysql_query($Sql51);
while ($Row = mysql_fetch_array($Result51))
{
$id251=$Row[id];
$name251=$Row[name];
$wsf251=$Row[wsf];
$wsfto251=$Row[wsfto];
$name_cus_a1=$Row[name_cus_a];
$name_cus_b1=$Row[name_cus_b];
$cat_all251=$Row[cat_all];
$cat251=$Row[cat];
$pic251=$Row[pic1];
$name_cus_a251=$Row[name_cus_a];
$katebp1=$Row[kateb];
$name_lestp1=$Row[name_lest];
$longup1=$Row[longu];
$latup1=$Row[latu];
$radiusup1=$Row[radiusu];
$locationup1=$Row[locationu];
$locationutop1=$Row[locationuto];
$wsf251=mb_substr($wsf251, 0, 800, "utf-8");
if($lang=='en')
{
$namess="$name251";
$wsfss="$wsf251";
}
else {
$namess="$katebp1";
$wsfss="$wsfto251";
}
if($pic251!='')
{
$pic2x51="pic_ar/$pic251";
}
else
{
$pic2x51="";
}
$rr1=$rr1+1;
?>
['
'],
}?>
[''],
];
// Multiple Pointers with Different Colors
var mapPointers = [
$Sql52 = "select * from articles_all_lis
where cat_all='5' ORDER BY id desc limit 5";
$Result52 = mysql_query($Sql52);
while ($Row = mysql_fetch_array($Result52))
{
$id252=$Row[id];
$name252=$Row[name];
$wsf25=$Row[wsf];
$name_cus_a2=$Row[name_cus_a];
$name_cus_b2=$Row[name_cus_b];
$cat_all252=$Row[cat_all];
$cat252=$Row[cat];
$pic252=$Row[pic1];
$name_cus_a252=$Row[name_cus_a];
$katebp2=$Row[kateb];
$name_lestp2=$Row[name_lest];
$longup2=$Row[longu];
$latup2=$Row[latu];
$radiusup2=$Row[radiusu];
$locationup2=$Row[locationu];
$locationutop2=$Row[locationuto];
$wsf252=mb_substr($wsf252, 0, 800, "utf-8");
if($pic252!='')
{
$pic2x52="pic_ar/$pic252";
}
else
{
$pic2x52="";
}
$rr2=$rr2+1;
?>
['images/map-marker.png'],
}?>
['images/map-marker.png']
];
var map;
var bounds = new google.maps.LatLngBounds();
var current_item = jQuery("#map-canvas-multipointer");
var map_address = current_item.data('address');
var map_latlng = current_item.data('latlng');
var map_zoom = current_item.data('zoom');
var map_style = current_item.data('mapstyle');
var map_title = current_item.data('title');
var map_descr = jQuery(current_item.data("popupstring-id")).html();
var map_pointer = current_item.data('marker');
var mapOptions = {
scrollwheel: false,
scaleControl: true,
disableDefaultUI: true,
panControl: true,
zoomControl: true, //zoom
mapTypeControl: true,
streetViewControl: true,
overviewMapControl: true,
styles: THEMEMASCOT_googlemap_styles[map_style ? map_style : 'default'],
mapTypeId: 'roadmap'
};
// Display a map on the page
map = new google.maps.Map(current_item.get(0), mapOptions);
map.setTilt(45);
// Display multiple markers on a map
var infoWindow = new google.maps.InfoWindow(), marker, i;
// Loop through our array of markers & place each one on the map
for( i = 0; i < markers.length; i++ ) {
var position = new google.maps.LatLng(markers[i][1], markers[i][2]);
bounds.extend(position);
marker = new google.maps.Marker({
position: position,
map: map,
title: markers[i][0],
icon: mapPointers[i][0]
});
// Allow each marker to have an info window
google.maps.event.addListener(marker, 'click', (function(marker, i) {
return function() {
infoWindow.setContent(infoWindowContent[i][0]);
infoWindow.open(map, marker);
}
})(marker, i));
// Automatically center the map fitting all markers on the screen
map.fitBounds(bounds);
}
// Override our map zoom level once our fitBounds function runs (Make sure it only runs once)
var boundsListener = google.maps.event.addListener((map), 'bounds_changed', function(event) {
this.setZoom(map_zoom);
google.maps.event.removeListener(boundsListener);
});
}
var THEMEMASCOT_googlemap_init_obj = {};
var THEMEMASCOT_GEOCODE_ERROR = "Error";
// Google map Styles
var THEMEMASCOT_googlemap_styles = {
'default': [],
'style1': [{"featureType":"administrative","elementType":"labels.text.fill","stylers":[{"color":"#444444"}]},{"featureType":"landscape","elementType":"all","stylers":[{"color":"#f2f2f2"}]},{"featureType":"landscape.man_made","elementType":"geometry.fill","stylers":[{"color":"#eeeeee"}]},{"featureType":"landscape.natural.landcover","elementType":"geometry.fill","stylers":[{"color":"#dddddd"}]},{"featureType":"landscape.natural.terrain","elementType":"geometry.fill","stylers":[{"color":"#dddddd"}]},{"featureType":"poi","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"all","stylers":[{"saturation":-100},{"lightness":45}]},{"featureType":"road.highway","elementType":"all","stylers":[{"visibility":"simplified"}]},{"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"}]},{"featureType":"water","elementType":"geometry.fill","stylers":[{"color":"#FFBD1F"}]},{"featureType":"water","elementType":"labels.text.fill","stylers":[{"color":"#979797"}]},{"featureType":"water","elementType":"labels.text.stroke","stylers":[{"weight":"0.01"}]}],
'style2': [{"featureType": "landscape","stylers": [{"hue": "#007FFF"},{"saturation": 100},{"lightness": 156},{"gamma": 1}]},{"featureType": "road.highway","stylers": [{"hue": "#FF7000"},{"saturation": -83.6},{"lightness": 48.80000000000001},{"gamma": 1}]},{"featureType": "road.arterial","stylers": [{"hue": "#FF7000"},{"saturation": -81.08108108108107},{"lightness": -6.8392156862745},{"gamma": 1}]},{"featureType": "road.local","stylers": [{"hue": "#FF9A00"},{"saturation": 7.692307692307736},{"lightness": 21.411764705882348},{"gamma": 1}]},{"featureType": "water","stylers": [{"hue": "#0093FF"},{"saturation": 16.39999999999999},{"lightness": -6.400000000000006},{"gamma": 1}]},{"featureType": "poi","stylers": [{"hue": "#00FF60"},{"saturation": 17},{"lightness": 44.599999999999994},{"gamma": 1}]}],
'style3': [{stylers: [{ hue: "#00ffe6" },{ saturation: -20 }]},{featureType: "road",elementType: "geometry",stylers: [{ lightness: 100 },{ visibility: "simplified" }]},{featureType: "road",elementType: "labels",stylers: [{ visibility: "off" }]}],
'style4': [{"stylers": [{ "saturation": -100 }]}],
'style5': [{"featureType": "landscape","stylers": [{ "hue": "#FF0300" },{ "saturation": -100 },{ "lightness": 20.4705882352941 },{ "gamma": 1 }]},{"featureType": "road.highway","stylers": [{ "hue": "#FF0300" },{ "saturation": -100 },{ "lightness": 25.59999999999998 },{ "gamma": 1 }]},{"featureType": "road.arterial","stylers": [{ "hue": "#FF0300" },{ "saturation": -100 },{ "lightness": -22 },{ "gamma": 1 }]},{"featureType": "road.local","stylers": [{ "hue": "#FF0300" },{ "saturation": -100 },{ "lightness": 21.411764705882348 },{ "gamma": 1 }]},{"featureType": "water","stylers": [{ "hue": "#FF0300" },{ "saturation": -100 },{ "lightness": 21.411764705882348 },{ "gamma": 1 }]},{"featureType": "poi","stylers": [{ "hue": "#FF0300" },{ "saturation": -100 },{ "lightness": 4.941176470588232 },{ "gamma": 1 }]}],
'style6': [{"featureType": "landscape","stylers": [{ "hue": "#FF0300" },{ "saturation": -100 },{ "lightness": 20.4705882352941 },{ "gamma": 1 }]},{"featureType": "road.highway","stylers": [{ "hue": "#FF0300" },{ "saturation": -100 },{ "lightness": 25.59999999999998 },{ "gamma": 1 }]},{"featureType": "road.arterial","stylers": [{ "hue": "#FF0300" },{ "saturation": -100 },{ "lightness": -22 },{ "gamma": 1 }]},{"featureType": "road.local","stylers": [{ "hue": "#FF0300" },{ "saturation": -100 },{ "lightness": 21.411764705882348 },{ "gamma": 1 }]},{"featureType": "water","stylers": [{ "hue": "#FF0300" },{ "saturation": -100 },{ "lightness": 21.411764705882348 },{ "gamma": 1 }]},{"featureType": "poi","stylers": [{ "hue": "#FF0300" },{ "saturation": -100 },{ "lightness": 4.941176470588232 },{ "gamma": 1 }]}],
'style7': [{"featureType":"landscape","stylers":[{ "invert_lightness": true },{"saturation":-100},{"lightness":65},{"visibility":"on"}]},{"featureType":"poi","stylers":[{"saturation":-100},{"lightness":51},{"visibility":"simplified"}]},{"featureType":"road.highway","stylers":[{"saturation":-100},{"visibility":"simplified"}]},{"featureType":"road.arterial","stylers":[{"saturation":-100},{"lightness":30},{"visibility":"on"}]},{"featureType":"road.local","stylers":[{"saturation":-100},{"lightness":40},{"visibility":"on"}]},{"featureType":"transit","stylers":[{"saturation":-100},{"visibility":"simplified"}]},{"featureType":"administrative.province","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"labels","stylers":[{"visibility":"on"},{"lightness":-25},{"saturation":-100}]},{"featureType":"water","elementType":"geometry","stylers":[{"hue":"#ffff00"},{"lightness":-25},{"saturation":-97}]}],
'style8': [{"featureType": "landscape","stylers": [{"hue": "#FFA800"},{"saturation": 17.799999999999997},{"lightness": 152.20000000000002},{"gamma": 1}]},{"featureType": "road.highway","stylers": [{"hue": "#007FFF"},{"saturation": -77.41935483870967},{"lightness": 47.19999999999999},{"gamma": 1}]},{"featureType": "road.arterial","stylers": [{"hue": "#FBFF00"},{"saturation": -78},{"lightness": 39.19999999999999},{"gamma": 1}]},{"featureType": "road.local","stylers": [{"hue": "#00FFFD"},{"saturation": 0},{"lightness": 0},{"gamma": 1}]},{"featureType": "water","stylers": [{"hue": "#007FFF"},{"saturation": -77.41935483870967},{"lightness": -14.599999999999994},{"gamma": 1}]},{"featureType": "poi","stylers": [{"hue": "#007FFF"},{"saturation": -77.41935483870967},{"lightness": 42.79999999999998},{"gamma": 1}]}],
'style9': [{"featureType": "water","elementType": "geometry.fill","stylers": [{"color": "#A3C6FE"}]}, {"featureType": "transit","stylers": [{"color": "#b3C6FE"}, {"visibility": "off"}]}, {"featureType": "road.highway","elementType": "geometry.stroke","stylers": [{"visibility": "on"}, {"color": "#EBCE7B"}]}, {"featureType": "road.highway","elementType": "geometry.fill","stylers": [{"color": "#ffffff"}]}, {"featureType": "road.local","elementType": "geometry.fill","stylers": [{"visibility": "on"}, {"color": "#ffffff"}, {"weight": 1.8}]}, {"featureType": "road.local","elementType": "geometry.stroke","stylers": [{"color": "#d7d7d7"}]}, {"featureType": "poi","elementType": "geometry.fill","stylers": [{"visibility": "on"}, {"color": "#ebebeb"}]}, {"featureType": "administrative","elementType": "geometry","stylers": [{"color": "#a7a7a7"}]}, {"featureType": "road.arterial","elementType": "geometry.fill","stylers": [{"color": "#ffffff"}]}, {"featureType": "road.arterial","elementType": "geometry.fill","stylers": [{"color": "#ffffff"}]}, {"featureType": "landscape","elementType": "geometry.fill","stylers": [{"visibility": "on"}, {"color": "#E9E5DC"}]}, {"featureType": "road","elementType": "labels.text.fill","stylers": [{"color": "#696969"}]}, {"featureType": "administrative","elementType": "labels.text.fill","stylers": [{"visibility": "on"}, {"color": "#737373"}]}, {"featureType": "poi","elementType": "labels.icon","stylers": [{"visibility": "off"}]}, {"featureType": "poi","elementType": "labels","stylers": [{"visibility": "off"}]}, {"featureType": "road.arterial","elementType": "geometry.stroke","stylers": [{"color": "#d6d6d6"}]}, {"featureType": "road","elementType": "labels.icon","stylers": [{"visibility": "off"}]}, {"featureType": "poi","elementType": "geometry.fill","stylers": [{"color": "#dadada"}]}],
'dark': [{"featureType": "landscape","stylers": [{"invert_lightness": true}, {"saturation": -100}, {"lightness": 65}, {"visibility": "on"}]}, {"featureType": "poi","stylers": [{"saturation": -100}, {"lightness": 51}, {"visibility": "simplified"}]}, {"featureType": "road.highway","stylers": [{"saturation": -100}, {"visibility": "simplified"}]}, {"featureType": "road.arterial","stylers": [{"saturation": -100}, {"lightness": 30}, {"visibility": "on"}]}, {"featureType": "road.local","stylers": [{"saturation": -100}, {"lightness": 40}, {"visibility": "on"}]}, {"featureType": "transit","stylers": [{"saturation": -100}, {"visibility": "simplified"}]}, {"featureType": "administrative.province","stylers": [{"visibility": "off"}]}, {"featureType": "water","elementType": "labels","stylers": [{"visibility": "on"}, {"lightness": -25}, {"saturation": -100}]}, {"featureType": "water","elementType": "geometry","stylers": [{"hue": "#ffff00"}, {"lightness": -25}, {"saturation": -97}]}],
'greyscale1': [{"stylers": [{"saturation": -100}]}],
'greyscale2': [{"featureType": "landscape","stylers": [{"hue": "#FF0300"}, {"saturation": -100}, {"lightness": 20.4705882352941}, {"gamma": 1}]}, {"featureType": "road.highway","stylers": [{"hue": "#FF0300"}, {"saturation": -100}, {"lightness": 25.59999999999998}, {"gamma": 1}]}, {"featureType": "road.arterial","stylers": [{"hue": "#FF0300"}, {"saturation": -100}, {"lightness": -22}, {"gamma": 1}]}, {"featureType": "road.local","stylers": [{"hue": "#FF0300"}, {"saturation": -100}, {"lightness": 21.411764705882348}, {"gamma": 1}]}, {"featureType": "water","stylers": [{"hue": "#FF0300"}, {"saturation": -100}, {"lightness": 21.411764705882348}, {"gamma": 1}]}, {"featureType": "poi","stylers": [{"hue": "#FF0300"}, {"saturation": -100}, {"lightness": 4.941176470588232}, {"gamma": 1}]}]
};
jQuery(function($) {
"use strict";
initialize();
});