function viewcontrols(mapv3){



    $(".zoomIn").click(function(){

    	mapv3.setZoom(mapv3.getZoom()+1);

        return false
    });


    $(".zoomOut").click(function(){

        mapv3.setZoom(mapv3.getZoom()-1);

        return false

    });


    $(".mapPanUp").click(function(){

        mapv3.panBy(0,-100);

        return false

    });


    $('.mapPanCenter').click(function(){

        mapv3.setCenter(locallatlng);
         mapv3.setZoom(initzoom);
        return false
    });


    $(".mapPanDown").click(function(){

        mapv3.panBy(0,100);

        return false

    });


    $(".mapPanLeft").click(function(){

        mapv3.panBy(-100,0);

        return false

    });


    $(".mapPanRight").click(function(){

        mapv3.panBy(100,0);

        return false

    });



    $(".mapSatellite").click(function(){

        mapv3.setMapTypeId(google.maps.MapTypeId.SATELLITE);

        return false
    });



    $(".mapPlan").click(function(){



        mapv3.setMapTypeId(google.maps.MapTypeId.ROADMAP);

        return false

    });

    $(".mapMixte").click(function(){

        mapv3.setMapTypeId(google.maps.MapTypeId.HYBRID);

        return false

    });


    $('.mapInfoshow').toggle(function(){

        $('.infocontainer').find(".mapInfos").fadeIn();
        
    },function(){
        $('.infocontainer').find(".mapInfos").fadeOut();

    });

    $('.mapLegend').live('click',function(){


        $('.legendcontent').show();
        $(this).removeClass('mapLegend').addClass('hideLegend');
        return false;


    });


    $('.hideLegend').live('click',function(){

        $('.legendcontent').hide();
        $(this).removeClass('hideLegend').addClass('mapLegend');
        return false;


    });

}
