Generating automatic maps from custom fields for all posts in a custom post type

Home Forums MapPress Support Generating automatic maps from custom fields for all posts in a custom post type

This topic contains 5 replies, has 2 voices, and was last updated by  Chris 4 months, 2 weeks ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #18276

    jaycollier
    Participant

    Hi!

    We love Map Press Pro, and are looking for a specific function. This may be easy, but I haven’t been able to find the right method.

    I have a custom post type for which each post has custom fields for latitude and longitude. I have created a template for that post type which displays content for each post.

    How can I display a map for each post generated from the latitude and longitude, without having to insert a short code with a map ID?

    TIA!

    #18277

    jaycollier
    Participant

    Wait! I think I found it. I set up automatic mapping via custom fields, and then used
    <p class=”prettyprint prettyprinted”><span class=”pun”>[</span><span class=”pln”>mashup query</span><span class=”pun”>=</span><span class=”str”>”current”</span><span class=”pun”>]
    </span></p>
    I think I’m all set. I keep finding more and more great features in this plugin. Thanks, Bill!

    #18278

    jaycollier
    Participant

    (Formatting problem 🙂

    Wait! I think I found it. I set up automatic mapping via custom fields, and then used the mashup query current shortcode.

    I think I’m all set. I keep finding more and more great features in this plugin. Thanks, Bill!

    #18279

    Chris
    Keymaster

    Hi,

    I’m glad you figured it out.  If it helps, there’s some info about this in the documentation.  One approach is to configure the custom field in the MapPress settings, then save the post(s).  The plugin will generate a map for each post.

    You can then enable automatic map display to show each post’s map when the post is viewed, or use a mashup to combine them.

    #18280

    jaycollier
    Participant

    Thanks, Chris! That’s exactly what I did.

    How do I remove the hamburger menu upper left that contains the text “Center Map”? I searched for “center map” in the documentation with no hits.

    #18281

    Chris
    Keymaster

    Sorry, it’s not currently possible to remove the hamburger, but you can hide it with CSS:

     

    .mapp-menu-toggle { display: none; }

    #18282

    jaycollier
    Participant

    Perfect!

    Thanks, again!

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.