view client/src/components/Map.jsx @ 129:ee5a3dd8e972

Forgot to check if a db connection is already close when closing idle db connections.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 28 Jun 2018 16:45:01 +0200
parents 92e0c636e67c
children dc2a5920b731
line wrap: on
line source

/*eslint no-unused-vars: ["error", { "args": "none" }]*/
import "ol/ol.css";
import { Map, View } from "ol";
import TileLayer from "ol/layer/Tile";
import OSM from "ol/source/OSM";

export default {
  render(h) {
    return <div id="map" />;
  },
  data() {
    return {
      lat: 52.278889,
      long: 8.043056,
      zoom: 12,
      projection: "EPSG:4326"
    };
  },
  mounted() {
    console.log(this.centerX);
    new Map({
      layers: [
        new TileLayer({
          source: new OSM()
        })
      ],
      target: "map",
      view: new View({
        center: [this.long, this.lat],
        zoom: this.zoom,
        projection: this.projection
      })
    });
  }
};