Subversion Repositories eFlore/Applications.cel

Rev

Rev 2125 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2125 Rev 2127
Line 159... Line 159...
159
		select: function(event, ui) {
159
		select: function(event, ui) {
160
			var latLng = new google.maps.LatLng(ui.item.latitude, ui.item.longitude);
160
			var latLng = new google.maps.LatLng(ui.item.latitude, ui.item.longitude);
161
			deplacerMarker(latLng);
161
			deplacerMarker(latLng);
162
		}
162
		}
163
	});
163
	});
164
};
-
 
165
 
-
 
166
//+----------------------------------------------------------------------------------------------------------+
-
 
167
// GOOGLE MAP
-
 
168
var map;
-
 
169
var marker;
-
 
170
var latLng;
-
 
171
var geocoder;
-
 
Line 172... Line -...
172
 
-
 
173
$(document).ready(function() {
-
 
174
	initialiserGoogleMap();
-
 
175
	
164
 
176
	// Autocompletion du champ adresse
165
	// Autocompletion du champ adresse
177
	$("#carte-recherche").on('focus', function() {
166
	$("#carte-recherche").on('focus', function() {
178
		$(this).select();
167
		$(this).select();
179
	});
168
	});
Line 184... Line 173...
184
	$("#carte-recherche").keypress(function(e) {
173
	$("#carte-recherche").keypress(function(e) {
185
		if (e.which == 13) {
174
		if (e.which == 13) {
186
			e.preventDefault();
175
			e.preventDefault();
187
		}
176
		}
188
	});
177
	});
-
 
178
};
Line -... Line 179...
-
 
179
 
-
 
180
//+----------------------------------------------------------------------------------------------------------+
-
 
181
// GOOGLE MAP
-
 
182
var map;
-
 
183
var marker;
-
 
184
var latLng;
-
 
185
var geocoder;
-
 
186
 
-
 
187
$(document).ready(function() {
189
 
188
	initialiserGoogleMap();
190
	initialiserAutocompleteCommune();
-
 
191
	
-
 
192
	$("#geolocaliser").on('click', geolocaliser);
-
 
193
	
-
 
194
	google.maps.event.addListener(marker, 'dragend', surDeplacementMarker);
-
 
195
	
-
 
196
	google.maps.event.addListener(map, 'click', surClickDansCarte);
189
	initialiserAutocompleteCommune();
Line 197... Line 190...
197
});
190
});
198
 
191
 
199
function afficherErreurGoogleMap(status) {
192
function afficherErreurGoogleMap(status) {
Line 284... Line 277...
284
			var longitude = position.coords.longitude;
277
			var longitude = position.coords.longitude;
285
			latLng = new google.maps.LatLng(latitude, longitude);
278
			latLng = new google.maps.LatLng(latitude, longitude);
286
			deplacerMarker(latLng);
279
			deplacerMarker(latLng);
287
		});
280
		});
288
	}
281
	}
-
 
282
 
-
 
283
	// intéraction carte
-
 
284
	$("#geolocaliser").on('click', geolocaliser);
-
 
285
	google.maps.event.addListener(marker, 'dragend', surDeplacementMarker);
-
 
286
	google.maps.event.addListener(map, 'click', surClickDansCarte);
289
}
287
}
Line 290... Line 288...
290
 
288
 
291
function initialiserMarker(latLng) {
289
function initialiserMarker(latLng) {
292
	if (marker != undefined) {
290
	if (marker != undefined) {