vuelayers

Web map Vue components with the power of OpenLayers

MIT License

Downloads
10.2K
Stars
683
Committers
26

Bot releases are hidden (Show)

vuelayers - v0.10.6

Published by ghettovoice over 6 years ago

  • fix issue #46
  • fix error: global is undefined
vuelayers - v0.10.5

Published by ghettovoice over 6 years ago

vuelayers - v0.10.4

Published by ghettovoice over 6 years ago

Fix issues in #40 and #43

vuelayers - v0.10.3

Published by ghettovoice over 6 years ago

vuelayers - v0.10.2

Published by ghettovoice over 6 years ago

Patch that resolves issue with dataProjection plugin option #40

vuelayers - v0.10.1

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:

  • ES6 version files moved to 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

Other

  • new documentation site based on docsify. Now writing documentation is less complicated and I finish it soon
  • replace lodash dependency with own simplified mini lodash lib, ~150Kb reduced from final build
  • reactive data-projection property on the map component
  • Demo app upgraded to introduce new features
  • fixed warning about $services injection
    and other minor changes
vuelayers - v0.9.1 Patch release

Published by ghettovoice over 6 years ago

  • resolve #32
  • fix broken Travis build
  • update license info
vuelayers - v0.9.0

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)
vuelayers - v0.8.1

Published by ghettovoice almost 7 years ago

Fix issue with default value for crossOrigin prop in sources, changed to undefined by default

vuelayers - v0.8.0

Published by ghettovoice almost 7 years ago

  • added vl-layer-image and vl-source-image-static
  • vl-geom-*: added projection prop with default value EPSG:4326
  • vl-layer-*: extent in map view projection
  • vl-source-*: extent/coordinates in projection provided with projection prop

drop deprecated code

vuelayers - v0.7.5

Published by ghettovoice almost 7 years ago

  • vl-source-vector: added update:features event
  • vl-source-xyz: url prop as string or function
vuelayers - v0.7.4

Published by ghettovoice almost 7 years ago

  • fix issue #21
vuelayers - v0.7.3

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.

  • added named export of vl-text-style component (fix issue #20 )
  • added default scoped slot to vl-view component
  • life cycle events: mounted, created and destroyed reflects state of underlying OpenLayers instances
  • arguments, options, return values representing coordinates or extents now everywhere in EPSG:4326 projection
  • remove change events throttling in vl-view
  • update docs site
vuelayers - Patch release

Published by ghettovoice about 7 years ago

  • fix isse #17
vuelayers - v0.7.0

Published by ghettovoice about 7 years ago

Totally refactored core and components, now extracted into separate packages for each module system.

Features

  • 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).
  • Scoped slots id vl--feature, vl-geoloc, vl-overlay , vl-interaction-select to simplify work with state.
  • Support of synchronizable properties (.sync modifier).
  • Support of re-using internal OpenLayers object with the help of IdentityMap (same ol.View instance in multiple map instances).
  • Export all VueLayers mixins and helpers as core package for easily extending.
  • Support of all ol.Map events (such as precompose, postcompose) for low level interacting with map (animation and etc).
  • Drop strict components hierarchy, now any component may be rendered inside any other, auto search of suitable parent container (useful for rendering inside scoped slots, vl-overlay inside vl-feature for example).
  • standalone builds and separate components as packages for all popular module systems (ES, CommonJS, UMD).
  • add url, format, strategy options to vl-source-vector for easily load layers from backend.

Upgrade notes

  • 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.
  • All components initialization now is asynchronous. For usage of the API of a component instance there are two fields with promises that should be awaited before using component: $createPromsie and $mountPromise.
  • Compiled builds directory of the NPM package was changed to lib, style imports should be updated relative path.
  • Config of the 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.

vuelayers - v0.6.2

Published by ghettovoice over 7 years ago

New tile source component to work with Sputnik.ru tile server was added.

vuelayers - v0.6.1

Published by ghettovoice over 7 years ago

vuelayers - v0.6.0

Published by ghettovoice over 7 years ago

New features

  • WMTS layers through vl-source-wmts component. See demo source code for usage example.
  • Coordinates watcher inside vl-geom-* components.
  • ES6 pre-build version for usage with bundlers like Webpack 2 or Rollup.
  • Reduce size of UMD build.

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"
          }
      ]]]
    }
    
vuelayers - v0.5.2

Published by ghettovoice over 7 years ago

vuelayers - v0.5.1

Published by ghettovoice over 7 years ago

Package Rankings
Top 1.81% on Npmjs.org
Top 6.67% on Proxy.golang.org
Badges
Extracted from project README
Build Status Coverage Status GitHub tag NPM version License Downloads Dependencies