| Line 7... |
Line 7... |
| 7 |
import com.google.gwt.maps.client.InfoWindow;
|
7 |
import com.google.gwt.maps.client.InfoWindow;
|
| 8 |
import com.google.gwt.maps.client.InfoWindowContent;
|
8 |
import com.google.gwt.maps.client.InfoWindowContent;
|
| 9 |
import com.google.gwt.maps.client.MapType;
|
9 |
import com.google.gwt.maps.client.MapType;
|
| 10 |
import com.google.gwt.maps.client.MapWidget;
|
10 |
import com.google.gwt.maps.client.MapWidget;
|
| 11 |
import com.google.gwt.maps.client.control.LargeMapControl;
|
11 |
import com.google.gwt.maps.client.control.LargeMapControl;
|
| - |
|
12 |
import com.google.gwt.maps.client.event.MapZoomEndHandler;
|
| 12 |
import com.google.gwt.maps.client.event.MarkerClickHandler;
|
13 |
import com.google.gwt.maps.client.event.MarkerClickHandler;
|
| 13 |
import com.google.gwt.maps.client.event.MarkerDragEndHandler;
|
14 |
import com.google.gwt.maps.client.event.MarkerDragEndHandler;
|
| 14 |
import com.google.gwt.maps.client.event.MarkerDragStartHandler;
|
15 |
import com.google.gwt.maps.client.event.MarkerDragStartHandler;
|
| 15 |
import com.google.gwt.maps.client.event.MarkerDragEndHandler.MarkerDragEndEvent;
|
16 |
import com.google.gwt.maps.client.event.MarkerDragEndHandler.MarkerDragEndEvent;
|
| 16 |
import com.google.gwt.maps.client.event.MarkerDragStartHandler.MarkerDragStartEvent;
|
17 |
import com.google.gwt.maps.client.event.MarkerDragStartHandler.MarkerDragStartEvent;
|
| Line 52... |
Line 53... |
| 52 |
String valeurCommune = "Bourges";
|
53 |
String valeurCommune = "Bourges";
|
| 53 |
LatLng centreFrance = LatLng.newInstance(47.0504, 2.2347);
|
54 |
LatLng centreFrance = LatLng.newInstance(47.0504, 2.2347);
|
| 54 |
LatLng pointCommune = centreFrance;
|
55 |
LatLng pointCommune = centreFrance;
|
| 55 |
String codeCommune = "";
|
56 |
String codeCommune = "";
|
| Line 56... |
Line 57... |
| 56 |
|
57 |
|
| Line 57... |
Line 58... |
| 57 |
int niveauZoom = 9;
|
58 |
int niveauZoom = 13;
|
| 58 |
|
59 |
|
| Line 59... |
Line 60... |
| 59 |
Label panneauExplication = new Label(
|
60 |
Label panneauExplication = new Label(
|
| Line 135... |
Line 136... |
| 135 |
map.setUIToDefault();
|
136 |
map.setUIToDefault();
|
| 136 |
map.addControl(new LargeMapControl());
|
137 |
map.addControl(new LargeMapControl());
|
| 137 |
map.setCurrentMapType(MapType.getHybridMap());
|
138 |
map.setCurrentMapType(MapType.getHybridMap());
|
| 138 |
carteAjoutee = true;
|
139 |
carteAjoutee = true;
|
| 139 |
panneauCarto.doLayout();
|
140 |
panneauCarto.doLayout();
|
| - |
|
141 |
|
| - |
|
142 |
map.addMapZoomEndHandler(new MapZoomEndHandler() {
|
| - |
|
143 |
|
| - |
|
144 |
public void onZoomEnd(MapZoomEndEvent event) {
|
| - |
|
145 |
niveauZoom = event.getNewZoomLevel();
|
| - |
|
146 |
}
|
| - |
|
147 |
|
| - |
|
148 |
});
|
| 140 |
}
|
149 |
}
|
| Line 141... |
Line 150... |
| 141 |
|
150 |
|
| 142 |
public void AfficherMessageAucuneInfos() {
|
151 |
public void AfficherMessageAucuneInfos() {
|
| 143 |
mettreAJourInfos(centreFrance,"", niveauZoom);
|
152 |
mettreAJourInfos(centreFrance,"", niveauZoom);
|
| Line 152... |
Line 161... |
| 152 |
ExtElement bouton = Ext.get(idBouton);
|
161 |
ExtElement bouton = Ext.get(idBouton);
|
| Line 153... |
Line 162... |
| 153 |
|
162 |
|
| Line 154... |
Line 163... |
| 154 |
bouton.addListener("click", new EventCallback() {
|
163 |
bouton.addListener("click", new EventCallback() {
|
| 155 |
|
164 |
|
| 156 |
public void execute(EventObject e) {
|
165 |
public void execute(EventObject e) {
|
| 157 |
EntiteGeographiqueObservation infosCommune = new EntiteGeographiqueObservation(codeCommune,valeurCommune,null);
|
166 |
EntiteGeographiqueObservation infosCommune = new EntiteGeographiqueObservation(codeCommune,valeurCommune,null,null);
|
| 158 |
infosCommune.setLat(pointCommune.getLatitude()+"");
|
167 |
infosCommune.setLat(pointCommune.getLatitude()+"");
|
| 159 |
infosCommune.setLon(pointCommune.getLongitude()+"");
|
168 |
infosCommune.setLon(pointCommune.getLongitude()+"");
|
| Line 193... |
Line 202... |
| 193 |
options.setDraggable(true);
|
202 |
options.setDraggable(true);
|
| 194 |
final Marker marker = new Marker(pointMarqueur, options);
|
203 |
final Marker marker = new Marker(pointMarqueur, options);
|
| Line 195... |
Line 204... |
| 195 |
|
204 |
|
| 196 |
marker.addMarkerDragEndHandler(new MarkerDragEndHandler() {
|
205 |
marker.addMarkerDragEndHandler(new MarkerDragEndHandler() {
|
| 197 |
public void onDragEnd(MarkerDragEndEvent event) {
|
206 |
public void onDragEnd(MarkerDragEndEvent event) {
|
| 198 |
afficherInfoMarker(marker);
|
207 |
obtenirInfosCommunes(marker.getLatLng());
|
| Line 199... |
Line 208... |
| 199 |
}
|
208 |
}
|
| Line 200... |
Line 209... |
| 200 |
|
209 |
|