diegoazh / gmap-vue

A wrapper component for consuming Google Maps API built on top of Vue. Fork of the popular vue-google-maps plugin.
https://diegoazh.github.io/gmap-vue/
173 stars 51 forks source link

Bug: the path_changed event does not work on the GvmPolygon component #318

Closed Tuhtarov closed 6 months ago

Tuhtarov commented 6 months ago

Describe the bug

The path_changed event does not work on the GvmPolygon component after changing the coordinates of any point or after adding a new point. At the same time, the polygon itself on the map changes.

To reproduce

To verify this, just repeat the code of this autotest and add console.log to the beginning of the updateEdited function: https://github.com/diegoazh/gmap-vue/blob/master/packages/v3/cypress/runner/components/PolygonTest.vue

Expected behavior

The array of polygon coordinates in the reactive variable should change.

Screenshots

image The polygon itself has changed, but the data in the reactive variable has not changed

Desktop

Versions

Package manager

Plugin version

Tuhtarov commented 6 months ago

I’ll also add that the geoposition of GvmMarker on the map does not change when the data in the reactive variable responsible for the geoposition of the marker in my vue component changes. Initially, the marker appears on the map at the coordinates specified in the variable, but does not change when the variable data is changed.

create-issue-branch[bot] commented 6 months ago

Branch issue-318-Bug_the_path_changed_event_does_not_work_on_the_GvmPolygon_component created!

diegoazh commented 6 months ago

Hello @Tuhtarov, first of all, thank you for reporting this issue. I fixed the issues in the new version that was landed a few minutes ago. Please test it and let me know if something else happens. I'm going to close this issue considering it solved but, feel free to re-open it if you consider that necessary.

Tuhtarov commented 6 months ago

Hi @diegoazh. It worked after adding the polygon-key attribute. Thank you very much for the prompt work and for the cool library! :)