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 DrawRegular when custom geometry name #711

Closed
nicolo73 opened this issue Dec 7, 2021 · 2 comments
Closed

Problem with DrawRegular when custom geometry name #711

nicolo73 opened this issue Dec 7, 2021 · 2 comments
Labels

Comments

@nicolo73
Copy link

nicolo73 commented Dec 7, 2021

Hi Jean-Marc,
I think there is a problem when we have custom geometry name.

if (this.geometryName_) f.setGeometryName(this.geometryName_)

if (this.geometryName_) f.setGeometryName(this.geometryName_)
  //f.setGeometry (g);
  if (g.getType()==='Polygon') f.getGeometry().setCoordinates(g.getCoordinates());

In my case, I have a exception because setCoordinates is called on undefined.
Indeed f.getGeometry() return undefined after the geometryName is updated.
I think the comment should be removed to update the geometry after geometryName is changed.
I'm using:
"ol": "6.9.0",
"ol-ext": "3.2.16",

Thanks again for this great lib I'm using massively !
Regards,
Nicolas

@Viglino Viglino added the bug label Dec 11, 2021
Viglino added a commit that referenced this issue Dec 11, 2021
@Viglino
Copy link
Owner

Viglino commented Dec 11, 2021

I've fixed the issue in the last commit to take the geometry name into account when the feature is created.

@nicolo73
Copy link
Author

nicolo73 commented Dec 11, 2021 via email

@Viglino Viglino closed this as completed Mar 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants