Giter VIP home page Giter VIP logo

Comments (1)

Falke-Design avatar Falke-Design commented on June 5, 2024

1 - Is there a way to set the rotation center when the shape is being created? If not, is this an option that could be added to available options when creating a shape?

if you creating the shape with pmIgnore: true or OptIn then the layer will not get the pm property. This also means that the can't be rotate too. So I don't really understand how you rotate a layer if it has not the pm property of Geoman.

2 - What is currently the most 'correct' way to dynamically set a geoman item to { pmIgnore: true }? I know I can use L.PM.optin to go from true to false. But what about false to true?

Just update the options of a layer layer.options.pmIgnore = true

I do not understand your workflow but a solution could be that you draw the layer and listening for pm:create on the map. If the event is fired, you set the rotation center and the apply pmIgnore: true

map.on('pm:create', (e)=>{
   e.layer.pm.setRotationCenter(LATLNG);
   e.layer.options.pmIgnore = true;
});

from leaflet-geoman.

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.