Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not possible to add tags when viewer move promises resolve #281

Open
oscarlorentzon opened this issue Aug 2, 2018 · 0 comments
Open

Not possible to add tags when viewer move promises resolve #281

oscarlorentzon opened this issue Aug 2, 2018 · 0 comments

Comments

@oscarlorentzon
Copy link
Member

oscarlorentzon commented Aug 2, 2018

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.

@oscarlorentzon oscarlorentzon self-assigned this Aug 2, 2018
@oscarlorentzon oscarlorentzon changed the title Not possible to add tags when viewer move promises resolves Not possible to add tags when viewer move promises resolve Aug 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant