question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ol.render.Feature does not have geometry.getFlatInteriorPoint

See original GitHub issue

I got an Uncaught TypeError: geometry.getFlatInteriorPoint is not a function unless I define format: new ol.format.MVT({featureClass: ol.Feature}) on ol.source.VectorTile, which suggests that getFlatInteriorPoint is not defined for ol.render.Feature features.

Interestingly your example works just fine without featureClass: ol.Feature.

I’ll investigate this issue further, just wanted to mention this at the first place - maybe you have a suggestion from the top of your head.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
ahocevarcommented, Dec 6, 2017

Note that in OpenLayers, you can always configure the MVT format with featureClass: ol.Feature to support that kind of thing.

0reactions
pksorensencommented, Dec 6, 2017

ahh, yes - that worked. thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

OpenLayers v7.2.2 API - Module: ol/render/Feature
Geometry name to use when creating the Feature. Returns: Newly constructed ol/Feature with properties, geometry, and id copied over.
Read more >
Showing measurement in OpenLayers 6 while modifying
I have this code. I create class the name is MeasurementClass. this class used for overlays component creator, setting of html and configure ......
Read more >
How can we render an OpenLayers 3 feature to a canvas ...
I have a sample which renders a geometry to a canvas honoring the ol3 style but it only runs with the unbuilt version...
Read more >
OpenLayers 3 API Documentation - Class: Feature
You can set the geometry using the setGeometry method and get it with ... getGeometry(); // Render the feature as a point using...
Read more >
ol-mapbox-style - UNPKG
The CDN for ol-mapbox-style. ... ","CLASS_CONTROL","CLASS_COLLAPSED","family","split","_obj_js__WEBPACK_IMPORTED_MODULE_5__","SimpleGeometry","Geometry" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found