Hi,
I can give you some tips, but the final code will depend on your project.
Assuming that the post with ID: 123, has associated a point, you can access to the point’s data, calling to the WordPress function:
$point_data = get_post_meta( 123, 'cpm_point', true );
If you are using the free version of the plugin the result would be an associative array with the point’s data:
name
description
address
latitude
longitude
icon
thumbnail
if you are using the pro version of the plugin, where it is possible assign multiple points to a same post/page, the result of the function:
$point_data = get_post_meta( 123, 'cpm_point', true );
would be an array where each row is a matriz with the data corresponding to each point.
If you want to return, as result of your API, a json object, you simply should calling the function json_encode with the data of the points.
Best regards.
OMG OMG OMG – Thank you sooo much !!!
1st) AWESOME response time
2nd) Perfect answer for such a nap like me
3rd) Worked out of the box!!!
“cpm_point” was the magic word 🙂
Cheers
A very happy Blade <3