Giter VIP home page Giter VIP logo

leaflet.movemarker's People

Contributors

dekguh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

leaflet.movemarker's Issues

Marker icon position not at center polylines when the feature rotation marker active

System Information

Operation System: Mac OS
Os Version: Monterey
Browser: google chrome
Browser Version: 108.x

what happen?

center point on icon is not accurate with polylines.
Screen Shot 2022-12-27 at 10 02 28

Expectation

the icon's midpoint is in the middle of the polylines, so it's as if the icon made the lines.

To-do

  • explain the solution on documentation (next release)

bug when have same duration both fetching and animation (minor)

system information

Operation System: Mac OS
Os Version: Monterey
Browser: google chrome
Browser Version: 107.x

what happen?

when the animation duration same with the fetch interval duration, happened the bug on marker, it will always start from first lat lng. this bug found in the real case demo

ezgif com-gif-maker

Expectation

when it have same duration, no such bug occurs.

current solution

make the duration animation and fetch interval not the same, for example the duration of the animation is 10 seconds and the fetch interval is 11 seconds

Doesn't work with L.LatLng objects

Haven't tested with "real" latlngs, but this example gives me just headache and will not work whatever I tried to do:

const layers = {}

// create new motion marker
layers.player = L.motionMarker(
    [unproject(session.location)],
    {
        animate: true,
        duration: 1000,
        followMarker: true,
        hideMarker: false,
        rotateMarker: true,
        rotateAngle: session.location.rot,
        icon: L.divIcon({
            iconSize: [16, 16],
            className: 'bg-transparent',
            html: '<div><img src="./static/icons/icon_2.png" style="width: 16px; height: 16px; transform: translate(0, -4px);"></div>'
        })
    },
).addTo(map);

// set view to player
map.setView(layers.player.getLatLng(), 5);

Error:
image

Tried to solve myself the bug, but I cannot get much from that error and gave up :/

To-do list on early version

current version: 0.0.12 (beta)

To-do list marker features

  • animate moving marker
  • follow marker when moving (need more improve)
  • duration by speed (km)
  • rotation marker (need more improve)
  • disabled animate marker
  • stop animate marker
  • method moveTo (params: nextLatLng, options : { duration or speed })
  • show/hide marker

To-do list polyline features

  • animate polyline/trail
  • show/hide polyline
  • stop animate polyline
  • disabled animate polyline
  • max polyline line (old polyline will remove and replace new line)

Other To-do

  • create example with real case and basic usage
  • create documentation
  • fix disable follow marker bug with animate (minor) PR 9
  • dont execute rotation if addMore value rotateAngle same with current context rotateAngle (minor)
  • #12
  • #19

what next?

  • improve the follow marker
  • #25
  • improve animate polyline when on zoom
  • #26
  • demo version on vue and angular maybe
  • write testing

note: the item with checked has been merged with current version

If you love

if you like what i do with my stuff, you can donate me a beer ๐Ÿ—ฟ

Report Issue/Question

How to make a question and report issue

use label help wanted & bug for bug report and label help wanted & question for a question

Structure

use this structure for make a issue

system information

Operation System:
Os Version:
Browser:
Browser Version:

What happen?

explain in detail what happened or in detail your question.

Expectation

what kind of expectations do you want, please explain in detail.

Reproduce

Explain in detail the steps until you get the error/bug/something what ever and dont forget to attach the codesandbox

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.