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

Problem with the Markers #116

Closed
davidboutet opened this issue Jul 13, 2017 · 5 comments
Closed

Problem with the Markers #116

davidboutet opened this issue Jul 13, 2017 · 5 comments

Comments

@davidboutet
Copy link

Cant add Markers in the config, forEach is undefined

MarkerGroup.js:29 Uncaught TypeError: Cannot read property 'forEach' of undefined
at new MarkerGroup (MarkerGroup.js:29)
at new MarkerContainer (MarkerContainer.js:62)
at b.handlePlay (Panorama.js:348)
at HTMLDivElement.e (video.min.js:22)
at HTMLDivElement.e (video.min.js:22)
at HTMLDivElement.d.dispatcher.d.dispatcher (video.min.js:22)
at Object.h [as trigger] (video.min.js:22)
at b.a.trigger (video.min.js:14)
at b.handleTechPlay_ (video.min.js:17)
at b.e (video.min.js:22)

@yanwsh
Copy link
Owner

yanwsh commented Jul 13, 2017

could you provide me your implementation code?

@yanwsh
Copy link
Owner

yanwsh commented Jul 13, 2017

The input option for marker should be array.

like

            Markers: [
                {
                    location: {
                        lat: 20,
                        lon: 160
                    },
                    radius: 500,
                    element: "Marker 2",
                }
            ]

element could be DOM or string
element: document.getElementById("a")

@davidboutet
Copy link
Author

davidboutet commented Jul 14, 2017

This is my configuration:

player.panorama({
                    clickToToggle: (!isMobile()),
                    clickAndDrag: true,
                    autoMobileOrientation: isMobile(),
                    initFov: 100,
                    VREnable: isMobile(),
                    backToInitLat: false,
                    backToInitLon: false,
                    Notice: {
                        Enabled: true,
                        Message: (isMobile())? "please drag and drop the video" : "please use your mouse drag and drop the video"
                    },
                    Markers: [
                        {
                            location: {
                                lat: 20,
                                lon: 160
                            },
                            radius: 500,
                            element: "Marker 2"
                        }
                    ],
                    ready: function () {
                        if(!isMobile()) player.play();
                    }
                });

and I still have the same issue "Cannot read property 'forEach' of undefined"

@yanwsh
Copy link
Owner

yanwsh commented Jul 14, 2017

Thank you for your report, this bug is fixed, please download plugin again, and let me know if you have any other issues.

@yanwsh yanwsh closed this as completed Jul 14, 2017
@davidboutet
Copy link
Author

Everything is fine! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants