mistic100 / Photo-Sphere-Viewer

A JavaScript library to display 360° sphere panoramas.
https://photo-sphere-viewer.js.org
MIT License
1.87k stars 675 forks source link

Draw polygons and lines with hotspot markers #1414

Closed guoshao99 closed 1 week ago

guoshao99 commented 2 weeks ago

Describe your problem

How are the polygons and polylines drawn using the marked points in the demo (with the help of third-party tools or within the Photo Sphere Viewer framework) and displayed on the panoramic image New polygon marker和New polyline marker two https://photo-sphere-viewer.js.org/playground.html

Online demo URL

No response

Photo Sphere Viewer version

5.8.2

Plugins loaded

Marker

Additional context

No response

mistic100 commented 2 weeks ago

Please detail your question, I don't understand.

Also check the doc https://photo-sphere-viewer.js.org/plugins/markers.html#polygon

guoshao99 commented 2 weeks ago

Is this tool used to draw polygons and polylines for creating panoramic images? https://geojson.readthedocs.io/en/latest/#polygon

https://photo-sphere-viewer.js.org/playground.html

Rai-Rai commented 2 weeks ago

No external tool is used/needed to draw the polygon. Showing polygon/polyline is a feature of PSV.

The Playground just reacts to the click on the panorama and adds the click coordinates to the poly* which is currently created. See here: https://github.com/mistic100/Photo-Sphere-Viewer/blob/052c9458ffa1989efd824ecbc48ac8c71d0abd4e/docs/.vuepress/components/Playground.vue#L1176

guoshao99 commented 1 week ago

If I have already implemented polygon marking, but I need to modify the marking of this polygon, can it support dragging polygon points for modification? I still need to implement it myself Similar to the image below 1725355191133

I need to achieve this effect, where a dot appears every time I click, but I don't know how to do it `

`

mistic100 commented 1 week ago

There is not possibility to do that in Photo Sphere Viewer. It is possible because polygon markers are simple SVG elements but you will have to do it all by yourself, I will not provide help.

guoshao99 commented 1 week ago

Although it is a simple SVG tag, can you provide more attributes? I think there should be many people using this as well