Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: close KML polygons #7

Merged
merged 4 commits into from
Oct 24, 2013
Merged

fix: close KML polygons #7

merged 4 commits into from
Oct 24, 2013

Conversation

javisantana
Copy link
Contributor

hey @davethau, this pull request should fix the problem with open polygons when they're saved to fusion tables.

I didn't tested it

@davethau
Copy link
Contributor

Hi Javi!
Can you check if the polygons are closed in the Area object too? I'd prefer it they were in sync.
Best,
Thau

@javisantana
Copy link
Contributor Author

Hi Dave, I don't remember exactly what you are referring to but fixing that function should fix all the places where polygons are encoded to kml

@javisantana
Copy link
Contributor Author

Hey @davethau, i've just commited a fix that closes polygons client side so they are stored closed in the database.

I tested it only using unit tests, if you have any problem when you try in real environment let me know.

The way I fixed it is pretty easy, just when polygon mode is serialized (toJSON method) I close polygons. In the deserialization (parse method) I check if it's closed and remove the old one in order to the data model is the same for the app.

I also removed the code for close polygons in KML conversion code since the paths are closed in the database.

Cheers

davethau added a commit that referenced this pull request Oct 24, 2013
@davethau davethau merged commit 30ce145 into Vizzuality:master Oct 24, 2013
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants