changelog/v3.11.0.md
The v3.11.0 release includes features and fixes from 73 pull requests since the v3.10.1 release. New features and improvements include:
ol.format.KML changesKML icons are scaled 50% so that the rendering better matches Google Earth rendering.
If a KML placemark has a name and is a point, an ol.style.Text is created with the name displayed to the right of the icon (if there is an icon).
This can be controlled with the showPointNames option which defaults to true.
To disable rendering of the point names for placemarks, use the option: new ol.format.KML({ showPointNames: false });
ol.interaction.DragBox and ol.interaction.DragZoom changesStyling is no longer done with ol.Style, but with pure CSS. The style constructor option is no longer required, and no longer available. Instead, there is a className option for the CSS selector. The default for ol.interaction.DragBox is ol-dragbox, and ol.interaction.DragZoom uses ol-dragzoom. If you previously had
new ol.interaction.DragZoom({
style: new ol.style.Style({
stroke: new ol.style.Stroke({
color: 'red',
width: 3
}),
fill: new ol.style.Fill({
color: [255, 255, 255, 0.4]
})
})
});
you'll now just need
new ol.interaction.DragZoom();
but with additional css:
.ol-dragzoom {
border-color: red;
border-width: 3px;
background-color: rgba(255,255,255,0.4);
}
ol.source.TileVectorWith the introduction of true vector tile support, ol.source.TileVector becomes obsolete. Change your code to use ol.layer.VectorTile and ol.source.VectorTile instead of ol.layer.Vector and ol.source.TileVector.
ol.Map#forEachFeatureAtPixel changes for unmanaged layersol.Map#forEachFeatureAtPixel will still be called for unmanaged layers, but the 2nd argument to the callback function will be null instead of a reference to the unmanaged layer. This brings back the behavior of the abandoned ol.FeatureOverlay that was replaced by unmanaged layers.
If you are affected by this change, please change your unmanaged layer to a regular layer by using e.g. ol.Map#addLayer instead of ol.layer.Layer#setMap.
0 as value (@adube)0 value (@adube)translatestart, translateend and translating events to ol.interaction.Translate (@jonataswalker)