Skip to content

Commit 81c3935

Browse files
committed
Modif js
1 parent aca56f7 commit 81c3935

17 files changed

+35
-0
lines changed

README.md

100644100755
File mode changed.

css/style.css

100644100755
File mode changed.

flash/soucoupe.as

100644100755
File mode changed.

flash/test.as

100644100755
File mode changed.

flash/test.fla

100644100755
File mode changed.

flash/test.swf

100644100755
File mode changed.

flash/theRocket.as

100644100755
File mode changed.

img/avion.png

100644100755
File mode changed.

img/mouton.png

100644100755
File mode changed.

img/mouton2.png

100644100755
File mode changed.

img/rocket.png

100644100755
File mode changed.

img/soucoupe.png

100644100755
File mode changed.

img/soucoupe2.png

100644100755
File mode changed.

img/test.png

100644100755
File mode changed.

index.html

100644100755
File mode changed.

js/map.js

100644100755
+35
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,41 @@ document.onkeydown = function(e){
4949
position.latmouton = point.getLatitude();
5050
position.lngmouton = point.getLongitude();
5151
position.distance = Math.sqrt(Math.pow(position.latcenter-position.latmouton,2)+Math.pow(position.lngcenter-position.lngmouton,2));
52+
<<<<<<< HEAD
53+
=======
54+
//Déplacement sur la carte
55+
switch (e.keyCode) {
56+
case 65: //Bouton A - Zoom +
57+
var lookAt = ge.getView().copyAsLookAt(ge.ALTITUDE_RELATIVE_TO_GROUND);
58+
lookAt.setRange(lookAt.getRange() / 8.0);
59+
ge.getView().setAbstractView(lookAt);
60+
break;
61+
case 90: //Bouton Z - Zoom -
62+
var lookAt = ge.getView().copyAsLookAt(ge.ALTITUDE_RELATIVE_TO_GROUND);
63+
lookAt.setRange(lookAt.getRange() * 8.0);
64+
ge.getView().setAbstractView(lookAt);
65+
break;
66+
case 38: //Bouton Up
67+
var camera = ge.getView().copyAsCamera(ge.ALTITUDE_RELATIVE_TO_GROUND);
68+
camera.setLatitude(camera.getLatitude() + 0.1);
69+
ge.getView().setAbstractView(camera);
70+
break;
71+
case 40: //Bouton Down
72+
var camera = ge.getView().copyAsCamera(ge.ALTITUDE_RELATIVE_TO_GROUND);
73+
camera.setLatitude(camera.getLatitude() - 0.1);
74+
ge.getView().setAbstractView(camera);
75+
break;
76+
case 37: //Bouton Left
77+
var camera = ge.getView().copyAsCamera(ge.ALTITUDE_RELATIVE_TO_GROUND);
78+
camera.setLongitude(camera.getLongitude() - 0.1);
79+
ge.getView().setAbstractView(camera);
80+
break;
81+
case 39: //Bouton Right
82+
var camera = ge.getView().copyAsCamera(ge.ALTITUDE_RELATIVE_TO_GROUND);
83+
camera.setLongitude(camera.getLongitude() + 0.1);
84+
ge.getView().setAbstractView(camera);
85+
break;
86+
>>>>>>> Modif js
5287
};
5388

5489

js/ovni.js

100644100755
File mode changed.

0 commit comments

Comments
 (0)