Web map Vue components with the power of OpenLayers
MIT License
Bot releases are hidden (Show)
Published by ghettovoice over 6 years ago
Published by ghettovoice over 6 years ago
Published by ghettovoice over 6 years ago
Fix issues in #40 and #43
Published by ghettovoice over 6 years ago
Published by ghettovoice over 6 years ago
Patch that resolves issue with dataProjection
plugin option #40
Published by ghettovoice over 6 years ago
There is a lot of error fixes, code improves and features in this release.
First of all note about upgrade from v0.9:
lib/_esm
folder for easy setup tools like babel-plugin-transform-imports
. If you use direct imports from vuelayers/lib/*
directory and rely on ES6 version change them to vuelayers/lib/_esm/*
core
subpackage dropped out. All stuff from core now published as a small separate packages that you can use as before. Mixins now at lib/mixin/*
/lib/_esm/mixin
directory, ol-ext
at lib/ol-ext
/lib/_esm
. ( #27 and #30 )bindToProj
global option renamed to dataProjection
New features
vl-interaction-draw
and vl-interaction-modify
- allow drawing and modifying vector features (documentation on the way)vl-geom-circle
- circle geometry componentvl-source-bing-maps
- loads tiled data from Bing Maps (https://vuelayers.github.io/#/component/bing-maps-source?id=usage)Other
lodash
dependency with own simplified mini lodash lib, ~150Kb reduced from final builddata-projection
property on the map componentPublished by ghettovoice over 6 years ago
Published by ghettovoice almost 7 years ago
The main change in this release concerns the projection of the coordinates. In previous releases coordinates, extents, GeoJSON Features were in hardcoded EPSG:4326 projection for simplicity, but because of this it was impossible to use VueLayers with custom projection.
From now all components by default accepts coordinates in projection of the map view like in OpenLayers. Projection of the view may be defined in vl-view
component, EPSG:3857 used by default.
To return the old behavior there is global option was introduced:
import Vue from 'vue'
import VueLayers from 'vuelayers'
// all input/output coordinates, GeoJSON features in EPSG:4326 projection
// like in < 0.9 version
Vue.use(VueLayers, {
bindToProj: 'EPSG:4326',
})
// Now all should work like before
With the new behavior coordinates should be provided in the map view projection (EPSG:3857 by default):
<template>
<vl-map>
<vl-view :center="center"></vl-view>
<vl-feature>
<vl-geom-polygon :coordinates="polygon"></vl-geom-polygon>
</vl-feature>
</vl-map>
</template>
<script>
import { core as vlCore } from 'vuelayers'
export default {
data () {
return {
center: vlCore.projHelper.fromLonLat([5, 5]/*, 'EPSG:3857'*/),
polygon: vlCore.projHelper.polygonFromLonLat([[[0, 0], [10, 10], [10, 0], [0, 0]]]/*, 'EPSG:3857'*/)
}
},
}
</script>
Custom projections should be registered before use (they may be needed when working with static image layers, example will be added to documentation and demo):
// App.vue
// create custom projection
let x = 1024 * 10000
let y = 968 * 10000
let imageExtent = [-x / 2, -y / 2, x / 2, y / 2]
let customProj = vlCore.projHelper.create({
code: 'xkcd-image',
units: 'pixels',
extent: imageExtent,
})
// add it to list of known projections
vlCore.projHelper.add(customProj)
Published by ghettovoice almost 7 years ago
Fix issue with default value for crossOrigin
prop in sources, changed to undefined
by default
Published by ghettovoice almost 7 years ago
projection
prop with default value EPSG:4326extent
in map view projectionprojection
propdrop deprecated code
Published by ghettovoice almost 7 years ago
update:features
eventurl
prop as string or functionPublished by ghettovoice almost 7 years ago
Published by ghettovoice almost 7 years ago
Current release fixes some API inconsistency in the part of receiving and returning of coordinates, and fixes several issues.
vl-text-style
component (fix issue #20 )vl-view
componentmounted
, created
and destroyed
reflects state of underlying OpenLayers instancesvl-view
Published by ghettovoice about 7 years ago
Published by ghettovoice about 7 years ago
Totally refactored core and components, now extracted into separate packages for each module system.
vl-overlay
component - component to be displayed over the map and attached to a single map location (wraps ol.Overlay
class).vl-source-cluster
component - layer source component to cluster vector data (wraps ol.source.Cluster
).vl--feature
, vl-geoloc
, vl-overlay
, vl-interaction-select
to simplify work with state..sync
modifier).ol.View
instance in multiple map instances).core
package for easily extending.ol.Map
events (such as precompose
, postcompose
) for low level interacting with map (animation and etc).vl-overlay
inside vl-feature
for example).url
, format
, strategy
options to vl-source-vector
for easily load layers from backend.vl-style-container
was renamed to vl-style-box
. The old name will be droped in the next release.selected
property was renamed to features
in the vl-interaction-select
component. Also now it is synchronizable property.vl-view
now is a part of map
package, i.e. it do not need to be installed it manually.lib
, style imports should be updated relative path.babel-plugin-component
/ babel-plugin-import
tool should be updated: style auto import should be disabled (compiled style from lib
directory can be added once in entry file, it's enough to load all VueLayers styles), libDir
/ libraryDirectory
option should be changed to lib
.There is new Demo and Install / Usage Guide that are introducing new features and usage.
Published by ghettovoice over 7 years ago
New tile source component to work with Sputnik.ru tile server was added.
Published by ghettovoice over 7 years ago
Published by ghettovoice over 7 years ago
New features
vl-source-wmts
component. See demo source code for usage example.vl-geom-*
components.Changes
Component names inside main namespace (VueLayers
) was changed according to the following rule.
It is important for those who have used the individual components.
Layer*
was changed to *Layer
Geom*
was changed to *Geom
Interaction*
was changed to *Interaction
Source*
was changed to *Source
Style*
was changed to *Style
(exclusions: StyleContainer
and StyleFunc
)// old code
import { Map, View, LayerTile, SourceOsm, InteractionSelect } from 'vuelayers'
// should be changed to
import { Map, View, TileLayer, OsmSource, SelectInteraction } from 'vuelayers'
Separate components path was changed to dist/modules
. If you use babel-plugin-component
you
should update plugin config. Example:
{
"presets": [
["latest", "stage-2"]
],
"plugins": [["component", [
{
"libraryName": "vuelayers",
"style": true,
"libDir": "dist/modules"
}
]]]
}
Published by ghettovoice over 7 years ago
Published by ghettovoice over 7 years ago