Git Product home page Git Product logo

Comments (4)

ghettovoice avatar ghettovoice commented on May 12, 2024 4

See this example
Currently there is an issue with overlay first render and re-rendering after update, so the special key used. This will be fixed in the next release

from vuelayers.

ghettovoice avatar ghettovoice commented on May 12, 2024

Overlay component not ready yet. I plan to include it in the next release.
Currently you can add an ol.Overlay instance through native OpenLayers API, vl-map component has property map - instance of ol.Map class.

<template>
  <vl-map ref="map">...</vl-map>
</template>
<script>
export default {
  mounted () {
    this.$refs.map.map.addOverlay(new ol.Overlay(...))
  }
}
</script>

from vuelayers.

ghettovoice avatar ghettovoice commented on May 12, 2024

As from version 0.7.x there is vl-overlay component was introduced that actually wraps ol.Overlay component under the hood. v0.7 Release notes

from vuelayers.

flyfishMT avatar flyfishMT commented on May 12, 2024

How would you suggest hooking into the map from the overlay so that it functioned like a popup? Like in this example: -

 map.on('singleclick', function(evt) {
        var coordinate = evt.coordinate;
        var hdms = ol.coordinate.toStringHDMS(ol.proj.transform(
            coordinate, 'EPSG:3857', 'EPSG:4326'));

        content.innerHTML = '<p>You clicked here:</p><code>' + hdms +
            '</code>';
        overlay.setPosition(coordinate);
      });

Would this be a new component?

from vuelayers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.