diff --git a/examples/config.json b/examples/config.json index 633c28221c..64bf8f15a7 100644 --- a/examples/config.json +++ b/examples/config.json @@ -55,7 +55,8 @@ "misc_clamp_ground": "Clamp 3d object to ground", "misc_camera_animation": "Camera animation", "misc_compare_25d_3d": "Compare 2.5D and 3D maps", - "misc_georeferenced_images": "Georeferenced image" + "misc_georeferenced_images": "Georeferenced image", + "misc_orthographic_camera": "Orthographic camera" }, "Plugins": { diff --git a/examples/misc_orthographic_camera.html b/examples/misc_orthographic_camera.html new file mode 100644 index 0000000000..3cfd7f9de5 --- /dev/null +++ b/examples/misc_orthographic_camera.html @@ -0,0 +1,98 @@ + + + + Title + + + + + + + + +
+ Key bindings + +
+
+ Scale + + + + + + + + + diff --git a/examples/view_2d_map.html b/examples/view_2d_map.html index cf860b5080..65f4e62ca2 100644 --- a/examples/view_2d_map.html +++ b/examples/view_2d_map.html @@ -30,17 +30,12 @@ // Instanciate PlanarView // By default itowns' tiles geometry have a "skirt" (ie they have a height), // but in case of orthographic we don't need this feature, so disable it - var view = new itowns.PlanarView(viewerDiv, extent, { disableSkirt: true, maxSubdivisionLevel: 10, placement: { tilt: 90 }, + var view = new itowns.PlanarView(viewerDiv, extent, { disableSkirt: true, maxSubdivisionLevel: 10, + cameraType: itowns.CAMERA_TYPE.ORTHOGRAPHIC, controls: { - // We do not want the user to zoom out too much - maxAltitude: 40000000, - // We want to keep the rotation disabled, to only have a view from the top - enableRotation: false, // Faster zoom in/out speed - zoomInFactor: 0.5, + zoomInFactor: 1, zoomOutFactor: 0.5, - // Don't zoom too much on smart zoom - smartZoomHeightMax: 100000, }, });