Fetching contributors…
Cannot retrieve contributors at this time
337 lines (262 sloc) 11.8 KB
Modest Maps JS Changelog.
Following the semantic versioning recommendation best we can:
"Consider a version format of X.Y.Z (Major.Minor.Patch).
Bug fixes not affecting the API increment the patch version,
backwards compatible API additions/changes increment the
minor version, and backwards incompatible API changes increment
the major version." -- http://semver.org/
- fixes blank tile hiding, setting visibility: hidden on tile error
and not assigning the tile-loaded class.
- .enable() and .disable() return the layer object as expected
- `setCenter()` now correctly calls enforceLimits so that `locationPoint`
is immediately accurate.
- Examples fixes
- Now builds with uglifyjs instead of YUICompressor
- Fixes rounding bug in MapProvider's `sourceCoordinate`
- Layers no longer copy their CSS properties from their parent nodes,
so that parent node CSS can be changed with properties like `clip` and
`opacity` without this having per-zoom-level effects.
- Fixes empty gif image
- Fixes problem with parent tiles by again assigning the element to have an
empty image as its src.
- Fixes bug where Layer.draw would try to draw even if not attached to a map.
- Adds `.enable()` and `.disable()` methods to layers, and
`.enableLayer()`/`.enableLayerAt()` and `.disableLayer()`/`.disableLayerAt()`
to the map object.
- Fixes bug in the MM.MapProvider.sourceCoordinate where tiles containing
areas within the tile limits were not loaded at lower zoom levels
- Adds named layers: a third parameter to MM.Layer and MM.TemplatedLayer
that sets the `.name` property of a layer. The layer name can be used
with the new `map.getLayer()` method, which returns the first layer
matching that name, and `map.removeLayer()`, which now accepts either the
literal layer object or the layer name as its one argument.
- Tests have moved from `/test/browser` to just `/test`
- Explicitly set the size of tiles to the `tileSize` parameter in the Map
object in order to support tiles that are not 256x256
- Fixes a bug in the TouchHandler leading to inaccurate movement
when on scalable devices like iPhones and not at native screen resolution.
- Fixes a bug in the `MM.Map` constructor which prevent `null` or
`undefined` being passed as the layers parameter. This makes it easier
to call `MM.Map` with only one argument - the div.
- `map.setZoomRange()` returns the map object to allow it to be chained
with other calls. It previously returned undefined.
- Instead of a tile URL or element, the message of the `requesterror` event
will be an object with `url` and `element` members relating to the source
element and its url / href
- Allows `touchstart` events to propagate to handlers instead of stopping
them at the TouchHandler level. This allows libraries that have elements
on the map that rely on `click` events to work. This does not fix the
problem of allowing scrollable elements in the map element.
- Fixing negative coordinate wrapping, identified at https://github.com/mapbox/tilemill/issues/1395
- Two breaking changes:
- requesterror now calls its callbacks with the img element, like
requestcomplete, not img.src as before
- TemplatedMapLayer renamed to Template, refs #14
- Fix Location.bearing method
- Update addMap API to better deal with layers that do deferred
`draw` calls - it now requests a redraw if the map has a center
- Fix TouchHandler refactor
- Revert futuristic layer-tile handling to cross-browser version
that touches all tiles on all moves.
- Fixes insertLayerAt behavior with indexes within the layers array.
Adds associated tests.
- Removes cache infrastructure
- Rewrites handlers to remove bind usage, now depends on browser cache
- Adds MM.Location.bearing
- Fixes coordLimits enforcement
- Removes TilePaintingProvider and auto-casting to it in setProvider,
updating all examples.
v1.0.0 (dev)
- `map.setSize` now only accepts an object of the form `{x: 0, y: 0}` or a
`MM.Point` object, and it calls its callback with a `MM.Point` argument.
- `map.roundZoom` added to the map to allow for the old behavior of
`map.setExtent` if desired.
- Maps now include `MM.TouchHandler()` by default for touch-device compatibility
- `MM.MouseWheelHandler()` now supports a second argument, `precise`, which,
when true, will allow intermediate zooms.
- MouseWheel events are now normalized to take advantage of acceleration and
avoid browser bugs.
- `map.setExtent()` now accepts either an array of `MM.Location` objects or an
`MM.MapExtent` object, which it converts to an array of locations with
- the `MM.Hash` event handler can set a map's center and zoom from the URL hash
(`#{zoom}/{lat}/{lon}`) and update the hash when it changes. A standalone
class is provided in `examples/hash/modestmaps.hash.js`.
- `MM.TemplatedMapProvider()` now supports quadkey coordinate substitutions in
URL templates with "{Q}" instead of the TMS-style "{Z}", "{X}" and "{Y}".
- `MM.TemplatedMapProvider()` also supports Microsoft-style URL templates,
which specify subdomain, zoom and quadkey placeholders with "{subdomains}",
"{zoom}" and "{quadkey}", respectively.
- Returns `this` from `map.addCallback()`, `map.removeCallback()`,
and `map.dispatchCallback()`
- Adds `map.destroy()` method, and in that process, allows all
handlers to be removable with a `.remove()` function.
- Removes unused 'parent' argument to `com.modestmaps.RequestManager`
- Adds a second parameter to `map.setExtent()` which, if true,
allows the extent set to place the map at a non-integer zoom level.
By default, `setEvent` will behave as before.
- Address issue where display:none on parent affects size detection
(thanks @tmcw)
- Remove arbitary default map size - parent size is used always unless
dimensions are specified. Use setSize to override at any time.
- Fix Location.interpolate between the same location
- Fix DragHandler - remove inertia code
- enforce limits when zooming and panning so that map functions are correct
when returning and before the deferred draw call using getFrame
- revert to @tmcw's original getFrame (simpler version broke in Chrome)
- revert Coordinate.toKey to string joining
- fix up utils.js functions so that tests run again
- modify double-tap thresholds and adjust onPinched behavior
- a few more cleanups in TouchHandler (mainly to use MM.Point functions)
- many tiny formatting/syntax fixes; thx JSHint!
- MM.moveElement is used for tile positioning
- MM.moveElement detects and uses CSS transforms wherever possible
- MM.bind is used for function binding instead of awkward closures
- MM.getFrame is used to request redraws
- MM.getFrame uses provisional requestAnimationFrame implementations if possible
- TouchHandler is in the default build of modestmaps.js
- Coordinate.toKey() is clever again ;)
Thanks to @tmcw for the majority of these contributions. They were contributed
on a branch, hence only one minor version number bump. As far as we know this
should all be backwards compatible. If we're mistaken, please file an issue at
Note also that we've now got fairly decent node.js support for the core MM.js
classes, and there's an example of how to use Modest Maps with node-canvas to
render static map images from a tiled data source. "npm install modestmaps" for
node.js fans :)
- Mouse handlers refactor: while MouseHandler is still available for adding
all handlers to the map, double-click, zoomwheel, and drag handlers are
available individually.
- Broken images that result from image loading errors are no longer added to
the map.
- Unimplemented abstract methods throw exceptions instead of calling `alert()`
- added MapProvider.setZoomRange for @straup
- misc syntax fixes and improve parseInt/radix correctness, from @tmcw
- switched to document fragment for loadingBay, from @tmcw
- added method chaining from @tmcw
- improve redraw behavior by ensuring layer is visible in getTileComplete
- use a closure in v0.14.2's setTimeout to ensure proper 'this'
- add setTimeout to processQueue to avoid stack overflow/recursion
bug in IE 7/8 (https://github.com/stamen/modestmaps-js/issues/12)
thanks @yhahn!
- reinstated display of children for missing tiles, except when if
map.enablePyramidLoading is set to true
- added map.enablePyramidLoading flag for pyramid loading (off by default)
- fixed Coordinate.prototype.toKey (back to string join to avoid collisions)
- changed the order of initialization so that event handlers go last
(this is so that attributes like layerParent are in place for complex
event handlers like anyzoom.js... handlers can also use callbacks now)
2011-01-03 note:
- broke modestmap.js file into src folder, now building with Makefile
- no functionality change to modestmaps.js (just whitespace changes)
- changed to img.style.width instead of img.width, for ipads (see examples/touch/test.html)
- stubbed out tilePadding into Map.draw
- removing magic numbers from Mercator projection for parity with Python version
- rejiggered the Map's draw function to be a bit clearer
- removed superfluous layer.coordinate (internal only)
- factored image loading out into a separate RequestManager
- cleaned up RequestManager to be less tile-centric, more img-centric
- made callback handling more modular
- re-instated zoom level check for setExtent (fixes bug where locations are all the same)
- moved to cssText for long CSS inits
- added 'drawn' callback
- added removeCallback
- correctly following semver.org now, incrementing minor version!
- modified queue sorting to support pyramid loading
- stubbed out pyramid loading
- tidied up draw code to be clearer (wantedTiles --> validTileKeys)
- added Point.distance and Point.interpolate
- added Location.distance and Location.interpolate
- tweak to sorting function that appears to fix an issue in IE8
- fixed tile sorting for in-between zoom levels
- fixed tile position in onload handler
- tidied up initial coord/position maths, now supports arbitrary zoom levels (with seams)
- changes to MapProvider.sourceCoordinate to support non-Mercator bounds
- added inner and outer limits to providers and enforcing min/max zoom in Map.draw()
- changed zoomByAbout to use zoomBy (and draw/enforceLimits) before applying panBy
- fixed bug that could break zooming if setCenterZoom was called with a string
- removed assumption that layers go from 0 to 20
- added rational version numbering
May 2010, pre-semver
+ added setSize and setProvider methods (fixed the latter so that all loads are canceled)
+ optional interaction (factored out mouse handling... enables touch or keyboard later)
+ made a touch handler for iphads
+ made a TemplatedMapProvider
+ made a demo that accepts a URL template for a map provider
+ started to work towards jslint conformance
+ started to move to 80 character line length where practical
+ made a demo with two maps, synchronized
+ jslint fixes, 80 char lines, better sorting, removed createOverlay
+ templated providers wrap around in longitude by default
+ added a demo keyboard handler
+ positioning single tiles in onload instead of redrawing everything
+ added a zoom box demo
+ make sure the cache gets cleared after a while (BIG FEATURE)
+ don't load above/below north/south poles (for default mercator maps)
+ added a random subdomain helper to templated providers