mapillary / mapillary/mapillary-js

Not possible to add tags when viewer move promises resolve

Open
#281 0 comments 0 reactions 1 assignee View on GitHub

@oscarlorentzon is already working on this.

Since Aug 2, 2018.

affects-public-api bug
Dominant language
TypeScript
Stars
516
Forks
89
PR merge metrics
No merged PRs in 30d

Description

Basic information

MapillaryJS version: 2.6.0
System/Browser: All

Steps to Reproduce Behavior
  1. Create a new viewer and activate the tag component
var viewer = new Mapillary.Viewer(..., '<original-image-key>');
viewer.activateComponent('tag');
var tagComponent = viewer.getComponent('tag');
  1. Move to a new key at a later point in time and set a tag related to the new image key
viewer.moveToKey('<tag-image-key>')
    .then(
        function(node) { 
            var tag = new Mapillary.TagComponent.OutlineTag(...);
            tagComponent.add(tag);
        });
Expected behavior

The tag is rendered correctly according to its geometry coordinates.

Actual behavior

The tag position will be related to the original-image-key and rendered incorrectly.

Additional information

To be able to render tags correctly, one has to use the Mapillary.Viewer.nodechanged event and add the tags related to a certain image key after that event has fired for that particular key.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.