Skip to content

Comments

Add filter to add geodata to REST API from OpenKaarten Geodata plugin#30

Closed
eyalacato wants to merge 2 commits intomasterfrom
feature/rest-add-geodata
Closed

Add filter to add geodata to REST API from OpenKaarten Geodata plugin#30
eyalacato wants to merge 2 commits intomasterfrom
feature/rest-add-geodata

Conversation

@eyalacato
Copy link
Contributor

Via the OpenKaarten Geodata plugin (which will be released shortly) you can add Geodata fields to post types, for example the OpenPub Items. Via this added filter the geodata will be added to the OpenPub REST API endpoint wp-json/owc/openpub/v1/items/active as a geometry object.

];

$data = $this->assignFields($data, $post);
$data = apply_filters( 'ok_geo_rest_add_geodata', $data, $post );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mijn voorstel zou zijn om de naamgeving van deze filter generieker te maken: owc/openpub/base/rest-add-fields

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mvdhoek1 : Wij willen dat hij toegevoegd kan worden in verschillende plugins van andere leveranciers. Jullie kunnen hem in de OpenPub toevoegen om aan de OpenPub de geodata toe te voegen aan de REST API en een andere partij kan dezelfde code toevoegen aan hun plugin om de geodata toe te voegen aan hun plugin. Om die reden willen we geen naamgeving gebruiken waar openpub in zit. Wel kunnen we hem owc/openkaarten/geodata/rest-add-fields of iets dergelijks noemen. Hoe lijkt dat je?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh op die manier, dan begrijp ik het. Dan is owc/openkaarten/geodata/rest-add-fields wmb akkoord!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mvdhoek1 : Ik heb de naam van het filter aangepast. Als jullie het hebben doorgevoerd en aan onze kant is de Geodata plugin te gebruiken, dan kunnen we testen of het werkt op deze manier, wat we voor ogen hebben.
Dank alvast!

@dtakken
Copy link
Contributor

dtakken commented Nov 11, 2024

@eyalacato : Is het OpenPUB endpoint hiermee ook te gebruiken als URL om een DataLayer van te maken?

@eyalacato
Copy link
Contributor Author

@dtakken : Dat is straks mogelijk met de uitbreidingen aan de OpenKaarten module. Dit staat echter nog niet live en volgt binnenkort.

@eyalacato eyalacato closed this Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants