Ajout du module GoogleMap
This commit is contained in:
23
js/gmap.js
Normal file
23
js/gmap.js
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
$('#menu-bar').append($('#myAdress'));
|
||||
$('#map').css({'visibility':'hidden'});
|
||||
$('#gmapLink').fancybox({
|
||||
'transitionIn': 'elastic',
|
||||
'transitionOut': 'elastic',
|
||||
'onClosed': function(){$('#map').css({'visibility':'hidden'});},
|
||||
'onStart': function(){$('#map').css({'visibility':'visible'});}
|
||||
});
|
||||
$('#myAdressField').keydown(function(e){
|
||||
var code = (e.keyCode ? e.keyCode : e.which);
|
||||
if(code == 13) {
|
||||
var adress = $(this).val();
|
||||
geocodeMarker(adress,adress,adress,'','http://maps.gstatic.com/intl/fr_ALL/mapfiles/markers/marker_sprite.png');
|
||||
geocodeCenter(adress);
|
||||
$('#gmapLink').trigger('click');
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user