POI Titles

Home Forums MapPress Support POI Titles

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

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17380

    stevenvh1
    Participant

    Hi

    I’m using Mappress Pro version 2.44.3 to generate a map for for each post of a particular type using a do_shortcode in the template file. The POI latitude and longitude are from custom fields. The code follows:

    <?php $my_post_meta_lat = get_post_meta($post->ID, ‘slat’, true);
    $my_post_meta_long = get_post_meta($post->ID, ‘slong’, true);
    if ( ! empty ( $my_post_meta_lat ) ){
    $shortcode = ‘[mashup mapid="2" height="400" width="500" zoom="9" title="test" ]‘;
    echo do_shortcode(“$shortcode”);
    }
    ?>

    I can’t seem to get it to display anything other than the lat/long as the POI link field in the popup.

    I have another page that call a mashup up all the posts of that type using a query but of course it shows the lat/long for each POI. The query is :

    [mashup mapid="64" query="squad" center="-33.15,146.9" zoom="6"]

    Also, the center tag seems to have no effect.

    I am probably missing something obvious but I haven’t been able to spot it.

    Thanks and regards
    Steven

    #17381

    Chris
    Keymaster

    Hi,

    That seems to just show map #2, if a lat/lng custom field is present, so it would show whatever was saved in map #2.

    Are you also using the ‘geocoding’ settings to generate a map in the post? If so, you can configure a field for lat, lng AND poi title, and the generated map should use that title. If you’re not using this already, please see the documentation for details about setting it up. You can use your existing custom fields and existing posts – just update the posts to generate the maps.

    Mashups autocenter so all the POIs are visible, so the center argument will be ignored.

    #17382

    stevenvh1
    Participant

    Hi Chris

    Wow – that was fast.

    I mustn’t have been clear. I am already using lat/long geocoding from custom fields to position the POI and have read that section of the doco. I had misunderstood the function of title in the geocoding section.

    My only question now is to ask if “meta-name” is the correct option in the title dropdown in the Mappress geocoding fields setup to use the post title as the POI title?

    Thanks and regards
    Steven

    #17383

    Chris
    Keymaster

    Hi,

    That dropdown matches the MapPress fields to the custom fields that already exist in your system (i.e., where one or more posts has those fields). Because ‘meta-name’ is specific to your system I can’t tell you if it’s the right field to use for POI titles – you’ll need to try it.

    Also in case it helps, here are two other things to know about titles:

    1) If you use an address instead of lat/lng in the geocoding fields, the plugin will show the address as the title by default.

    2) In mashups, you can set the plugin to display the post title rather than the POI title.

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

You must be logged in to reply to this topic.