Open Street Map: View all post of one cpt

Support General Open Street Map: View all post of one cptResolved

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #14228
    proyectohappyweb@gmail.com[email protected]
    Participant

    Hello,

    I try to use the Open Street Map.
    https://docs.metabox.io/fields/osm/

    I want to display all mark of all the posts of a cpt in the same map.

    It's possible this?

    Thanks,
    Sergio

    #14236
    Anh TranAnh Tran
    Keymaster

    Hi Sergo,

    The Open Street Map field is per post. If you need to display all location of all posts on a same map, you might need to write custom code. I'll make a tutorial about that later in the blog. Stay tuned.

    #14247
    proyectohappyweb@gmail.com[email protected]
    Participant

    oohh this would be fantastic!!!

    I know it exist the plugin of Leaflet:
    https://wordpress.org/plugins/leaflet-map/

    But I think if with your plugin I can do everything, it's not worth installing the other one...

    I will be waiting for your article.

    Many thanks.

    #14775
    proyectohappyweb@gmail.com[email protected]
    Participant

    Hello, you finally wrote the tutorial?

    Thanks,
    Sergio

    #14783
    Anh TranAnh Tran
    Keymaster

    Sorry for the delay, here you are.

    #14790
    proyectohappyweb@gmail.com[email protected]
    Participant

    Hello, many thanks!!

    Questions... I don't want to use a new page to insert the map... I want to put the map in the top of each archive pages of each cpt.
    To do that:
    1.- I have to put his line in my archive page?

    2.- I have to update something in the wp_enqueue_script function in functions.php ?

    3.- I have to modify something in the list.js ?

    4.- I have to put the list.js in my js folder?
    In my theme is here: .../wp-content/themes/theme-name/assets/js/
    In functions.php I have to update this code?
    wp_enqueue_script( 'list', get_parent_theme_file_uri( 'js/list.js' ), ['jquery', 'leaflet'], '1.0', true );
    to
    wp_enqueue_script( 'list', get_parent_theme_file_uri( 'js/assets/list.js' ), ['jquery', 'leaflet'], '1.0', true );

    Many thanks for your help.
    Sergio

    #14799
    proyectohappyweb@gmail.com[email protected]
    Participant

    Oh, it works well for me, forget my previous message. Thank you!!

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.