├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── docs ├── .DS_Store ├── .nojekyll ├── build.js ├── docs.js ├── examples │ ├── balloon-anchor.vue │ ├── balloon-pos-change.vue │ ├── balloon.vue │ ├── map-autocenter.vue │ ├── map-center.vue │ ├── map-change.vue │ ├── map-nodrag.vue │ ├── map-zoom-change.vue │ ├── map-zoom.vue │ ├── map.vue │ ├── marker-change.vue │ ├── marker-icon.vue │ ├── marker-pos.vue │ ├── marker-select.vue │ └── marker.vue ├── imgs │ ├── marker-blue.png │ ├── marker-green.png │ ├── marker-red.png │ └── patreon-medium-button.png ├── index.html ├── index.vue ├── introduction.vue └── roadmap.vue ├── package-lock.json ├── package.json └── src ├── main.js ├── ol-balloon.vue ├── ol-map.vue └── ol-marker.vue /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | nbproject 3 | npm-debug.log 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 2-Clause License 2 | 3 | Copyright (c) 2017, Sombriks 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | 2 | clean: 3 | rm -rf docs/build.js 4 | 5 | docs: clean 6 | npx cross-env NODE_ENV=production browserify docs/docs.js -o docs/build.js 7 | 8 | dev: clean 9 | budo docs/docs.js:build.js --dir docs --live --open -H 127.0.0.1 10 | 11 | release: docs 12 | npm publish 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue-openlayers 2 | 3 | **this project doesn't receive maintenance for a while**, 4 | if you need new features see [vue3-openlayers](https://github.com/MelihAltintas/vue3-openlayers) project. 5 | 6 | - humble wrapper for the powerful openlayers map api 7 | - demo/docs [here](https://sombriks.github.io/vue-openlayers) 8 | 9 | ## maintained version 10 | 11 | For a better maintained and modern version, please see [vue3-openlayers](https://github.com/MelihAltintas/vue3-openlayers) project. 12 | 13 | This project was a pleasure to create but sadly i can't maintain that. 14 | Hopefully [Melih Altıntaş](https://github.com/MelihAltintas) did a great job creating a modern wapper vor vue. 15 | 16 | ## Usage 17 | 18 | ```javascript 19 | 20 | // require the openlayers css 21 | require("../node_modules/openlayers/css/ol.css"); 22 | 23 | // require vue and any other shiny library 24 | const Vue = require('vue'); 25 | // ... 26 | // at some point require vue-openlayers 27 | const VueOpenLayers = require("vue-openlayers"); 28 | // ... 29 | // then install the plugin 30 | Vue.use(VueOpenLayers); 31 | 32 | // done! now on your .vue documents you have the right to use and 33 | ``` 34 | -------------------------------------------------------------------------------- /docs/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sombriks/vue-openlayers/b743e735daf18e01be621396bfb29d83891e2a09/docs/.DS_Store -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sombriks/vue-openlayers/b743e735daf18e01be621396bfb29d83891e2a09/docs/.nojekyll -------------------------------------------------------------------------------- /docs/docs.js: -------------------------------------------------------------------------------- 1 | 2 | // to do a nicer docs example 3 | require("../node_modules/flexboxgrid/css/flexboxgrid.css"); 4 | require("../node_modules/openlayers/css/ol.css"); 5 | 6 | // let's see it working 7 | const Vue = require("vue"); 8 | const VueRouter = require("vue-router"); 9 | const VueOpenLayers = require("../src/main"); 10 | 11 | Vue.use(VueRouter); 12 | Vue.use(VueOpenLayers); 13 | 14 | const routes = [ 15 | {path: "/introduction", component: require("./introduction.vue")}, 16 | {path: "/roadmap", component: require("./roadmap.vue")}, 17 | {path: "/map", component: require("./examples/map.vue")}, 18 | {path: "/mapcenter", component: require("./examples/map-center.vue")}, 19 | {path: "/mapchange", component: require("./examples/map-change.vue")}, 20 | {path: "/mapnodrag", component: require("./examples/map-nodrag.vue")}, 21 | {path: "/mapauto", component: require("./examples/map-autocenter.vue")}, 22 | {path: "/mapzoom", component: require("./examples/map-zoom.vue")}, 23 | {path: "/mapzoomchange", component: require("./examples/map-zoom-change.vue")}, 24 | {path: "/marker", component: require("./examples/marker.vue")}, 25 | {path: "/markerposition", component: require("./examples/marker-pos.vue")}, 26 | {path: "/markerchange", component: require("./examples/marker-change.vue")}, 27 | {path: "/markericon", component: require("./examples/marker-icon.vue")}, 28 | {path: "/markerselection", component: require("./examples/marker-select.vue")}, 29 | {path: "/balloon", component: require("./examples/balloon.vue")}, 30 | {path: "/balloonanchor", component: require("./examples/balloon-anchor.vue")}, 31 | {path: "/balloonchangepos", component: require("./examples/balloon-pos-change.vue")}, 32 | 33 | {path: "/", redirect: "/introduction"} 34 | ]; 35 | 36 | const router = new VueRouter({ 37 | routes 38 | }); 39 | 40 | const vm = new Vue({ 41 | router, 42 | el:"#mountpoint", 43 | render: function (createElement) { 44 | return createElement(require("../docs/index.vue")); 45 | } 46 | }); 47 | 48 | -------------------------------------------------------------------------------- /docs/examples/balloon-anchor.vue: -------------------------------------------------------------------------------- 1 | 32 | 41 | 46 | -------------------------------------------------------------------------------- /docs/examples/balloon-pos-change.vue: -------------------------------------------------------------------------------- 1 | 45 | 52 | -------------------------------------------------------------------------------- /docs/examples/balloon.vue: -------------------------------------------------------------------------------- 1 | 43 | 50 | -------------------------------------------------------------------------------- /docs/examples/map-autocenter.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 17 | -------------------------------------------------------------------------------- /docs/examples/map-center.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 17 | -------------------------------------------------------------------------------- /docs/examples/map-change.vue: -------------------------------------------------------------------------------- 1 | 38 | 61 | -------------------------------------------------------------------------------- /docs/examples/map-nodrag.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 36 | -------------------------------------------------------------------------------- /docs/examples/map-zoom-change.vue: -------------------------------------------------------------------------------- 1 | 35 | 36 | 52 | -------------------------------------------------------------------------------- /docs/examples/map-zoom.vue: -------------------------------------------------------------------------------- 1 | 35 | 36 | 52 | -------------------------------------------------------------------------------- /docs/examples/map.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 17 | -------------------------------------------------------------------------------- /docs/examples/marker-change.vue: -------------------------------------------------------------------------------- 1 | 34 | 35 | 50 | -------------------------------------------------------------------------------- /docs/examples/marker-icon.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 21 | -------------------------------------------------------------------------------- /docs/examples/marker-pos.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 21 | -------------------------------------------------------------------------------- /docs/examples/marker-select.vue: -------------------------------------------------------------------------------- 1 | 54 | 79 | -------------------------------------------------------------------------------- /docs/examples/marker.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 21 | -------------------------------------------------------------------------------- /docs/imgs/marker-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sombriks/vue-openlayers/b743e735daf18e01be621396bfb29d83891e2a09/docs/imgs/marker-blue.png -------------------------------------------------------------------------------- /docs/imgs/marker-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sombriks/vue-openlayers/b743e735daf18e01be621396bfb29d83891e2a09/docs/imgs/marker-green.png -------------------------------------------------------------------------------- /docs/imgs/marker-red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sombriks/vue-openlayers/b743e735daf18e01be621396bfb29d83891e2a09/docs/imgs/marker-red.png -------------------------------------------------------------------------------- /docs/imgs/patreon-medium-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sombriks/vue-openlayers/b743e735daf18e01be621396bfb29d83891e2a09/docs/imgs/patreon-medium-button.png -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Vue + Openlayers 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Star 13 | 14 | Issue 15 | 16 | Follow @sombriks 17 | 18 | 19 | patreon 20 | 21 |
22 |
23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/index.vue: -------------------------------------------------------------------------------- 1 | 33 | 38 | -------------------------------------------------------------------------------- /docs/introduction.vue: -------------------------------------------------------------------------------- 1 | 38 | 44 | 49 | -------------------------------------------------------------------------------- /docs/roadmap.vue: -------------------------------------------------------------------------------- 1 | 70 | 71 | 76 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-openlayers", 3 | "description": "humble wrapper for the powerful openlayers map api", 4 | "main": "src/main.js", 5 | "scripts": { 6 | "build": "make docs", 7 | "docs": "make docs", 8 | "dev": "make dev", 9 | "release": "make release" 10 | }, 11 | "version": "0.5.6", 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/sombriks/vue-openlayers.git" 15 | }, 16 | "keywords": [ 17 | "vue", 18 | "openlayers", 19 | "map", 20 | "component" 21 | ], 22 | "author": "Leonardo Silveira ", 23 | "license": "BSD-2-Clause", 24 | "bugs": { 25 | "url": "https://github.com/sombriks/vue-openlayers/issues" 26 | }, 27 | "homepage": "https://github.com/sombriks/vue-openlayers#readme", 28 | "dependencies": { 29 | "openlayers": "^4.0.1", 30 | "vue": "^2.1.10" 31 | }, 32 | "devDependencies": { 33 | "browserify": "^14.1.0", 34 | "browserify-css": "^0.10.0", 35 | "budo": "^9.4.7", 36 | "cross-env": "^3.1.4", 37 | "flexboxgrid": "^6.3.1", 38 | "make": "^0.8.1", 39 | "vue-router": "^2.2.1", 40 | "vueify": "^9.4.0" 41 | }, 42 | "browserify": { 43 | "transform": [ 44 | "browserify-css", 45 | "vueify" 46 | ] 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | 7 | const olMap = require("./ol-map.vue"); 8 | const olMarker = require("./ol-marker.vue"); 9 | const olBalloon = require("./ol-balloon.vue"); 10 | 11 | module.exports = { 12 | install: function (Vue, options) { 13 | // wiring project components 14 | Vue.component("ol-map", olMap); 15 | Vue.component("ol-marker", olMarker); 16 | Vue.component("ol-balloon", olBalloon); 17 | } 18 | }; 19 | -------------------------------------------------------------------------------- /src/ol-balloon.vue: -------------------------------------------------------------------------------- 1 | 6 | 87 | -------------------------------------------------------------------------------- /src/ol-map.vue: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 127 | 128 | -------------------------------------------------------------------------------- /src/ol-marker.vue: -------------------------------------------------------------------------------- 1 | 2 | 7 | 87 | 90 | --------------------------------------------------------------------------------