- 7 August 2015
- Moved demo code to be included in every project, making this library plug-and-play. Just check the box next to this library in your Lib folder and it should work.
- Added a zoom-level of 0, Stretch to Fit. It lives as the first, default zoom level.
Run the demo to see it in action. When you create a /map_zoom object, make sure to pass it the client you want it to affect.
You can specify the levels of zoom to go through. By default, it's 100%, 125%, 150%, 175%, 200%, 250%, 300%, then 400%. You call map_zoom.ZoomIn() to go up that series, and ZoomOut() to go down.
You can also specify the smoothing factor of the zoom to gradually, smoothly go between zoom levels. This is the
variable. You can disable smoothing by setting to 1, or disable zooming by setting it to 0.
This library should automatically affect your default map control. If for some reason it's not working, you can set the map_zoom.map_id to your map control's ID as shown in the skin editor.
This library will never change your client and world.view variables.
- Ctrl+Plus: Zoom In
- Ctrl+Minus: Zoom Out
- Ctrl+ScrollUp: Zoom In
- Ctrl+ScrollDown: Zoom Out
*Note: Scroll detection is a feature of 508.1287 beta. It won't work in earlier versions.