Site adresi : Yolcusuyum
Map kodları;
<script>
(function($){
var $et_main_map = $( '#et_main_map' );
et_active_marker = null;
$et_main_map.gmap3({
map:{
options:{
while ( have_posts() ) : the_post();
$et_location_lat = get_post_meta( get_the_ID(), '_et_listing_lat', true );
$et_location_lng = get_post_meta( get_the_ID(), '_et_listing_lng', true );
if ( '' != $et_location_lat && '' != $et_location_lng )
printf( 'center: [%s, %s],', $et_location_lat, $et_location_lng );
break;
endwhile;
rewind_posts();
?>
zoom:,
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: true,
mapTypeControlOptions: {
position : google.maps.ControlPosition.LEFT_CENTER,
style : google.maps.MapTypeControlStyle.DROPDOWN_MENU
},
streetViewControlOptions: {
position: google.maps.ControlPosition.LEFT_CENTER
},
navigationControl: false,
scrollwheel: true,
streetViewControl: true,
zoomControl: false
}
}
});
function et_add_marker( marker_order, marker_lat, marker_lng, marker_description ){
var marker_id = 'et_marker_' + marker_order;
$et_main_map.gmap3({
marker : {
id : marker_id,
latLng : [marker_lat, marker_lng],
options: {
icon : "/images/red-marker.png"
},
events : {
click: function( marker ){
if ( et_active_marker ){
et_active_marker.setAnimation( null );
et_active_marker.setIcon( '/images/red-marker.png' );
}
et_active_marker = marker;
marker.setAnimation( google.maps.Animation.BOUNCE);
marker.setIcon( '/images/blue-marker.png' );
$(this).gmap3("get").panTo( marker.position );
$.fn.et_simple_slider.external_move_to( marker_order );
},
mouseover: function( marker ){
$( '#' + marker_id ).css( { 'display' : 'block', 'opacity' : 0 } ).stop(true,true).animate( { bottom : '15px', opacity : 1 }, 500 );
},
mouseout: function( marker ){
$( '#' + marker_id ).stop(true,true).animate( { bottom : '50px', opacity : 0 }, 500, function() {
$(this).css( { 'display' : 'none' } );
} );
}
}
},
overlay : {
latLng : [marker_lat, marker_lng],
options : {
content : marker_description,
offset : {
y:-42,
x:-122
}
}
}
});
}
$i = 0;
while ( have_posts() ) : the_post();
$et_location_lat = get_post_meta( get_the_ID(), '_et_listing_lat', true );
$et_location_lng = get_post_meta( get_the_ID(), '_et_listing_lng', true );
$et_location_rating = '';
if ( ( $et_rating = et_get_rating() ) && 0 != $et_rating )
$et_location_rating = ' ';
if ( '' != $et_location_lat && '' != $et_location_lng ) {
?>
et_add_marker( %4$s
%5$s
' . $et_location_rating . '