Skip to content

Commit

Permalink
Upgrade notes for vector tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaub committed Aug 12, 2017
1 parent 13a761b commit 3b44497
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions changelog/upgrade-notes.md
Expand Up @@ -2,6 +2,27 @@

### Next release

#### `ol.source.VectorTile` no longer requires a `tileGrid` option

By default, the `ol.source.VectorTile` constructor creates an XYZ tile grid (in Web Mercator) for 512 pixel tiles and assumes a max zoom level of 22. If you were creating a vector tile source with an explicit `tileGrid` option, you can now remove this.

Before:
```js
var source = new ol.source.VectorTile({
tileGrid: ol.tilegrid.createXYZ({tileSize: 512, maxZoom: 22}),
url: url
});
```

After:
```js
var source = new ol.source.VectorTile({
url: url
});
```

If you need to change the max zoom level, you can pass the source a `maxZoom` option. If you need to change the tile size, you can pass the source a `tileSize` option. If you need a completely custom tile grid, you can still pass the source a `tileGrid` option.

#### `ol.interaction.Modify` deletes with `alt` key only

To delete features with the modify interaction, press the `alt` key while clicking on an existing vertex. If you want to configure the modify interaction with a different delete condition, use the `deleteCondition` option. For example, to allow deletion on a single click with no modifier keys, configure the interaction like this:
Expand Down

0 comments on commit 3b44497

Please sign in to comment.