Setting POI title, tooltip, and zoom level on automatic map

Home Forums MapPress Support Setting POI title, tooltip, and zoom level on automatic map

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #10000

    Hi Chris,

    I’m using MapPress Pro 2.38.3 to generate mashup maps of crime locations.  The mashup is working fine, but I’ve been unable to find a way to set descriptive titles on the map markers.

    I use these custom fields: address, lat, lng, and mpmeta_errs.

    Each post has one automatic map with one map marker generated by the custom field values.  To avoid excessive geocoding, I plan to eventually use lat and lng rather than an address for each post.  When I set the lat and lng values, the map and map marker are generated; however, even if I have also specified an address, the map marker tooltip and title are shown as the lat/lng coordinates rather than the address.  This is the case on the individual post and on the mashups that include the post.

    I also tried the following syntax on the address field value, both with and without specifying the lat and lng values:

    address=”513 W 7th St, 19805″ title=”513 W 7th St” iconid=”red-dot” point_lat=”39.744481″ point_lng=”-75.554222″

    When I DO also specify values for the lat and lng custom fields, the map generates.  However, the tooltip and title show “39.744481, -75.554222” rather than the address or title specified in the above value of the address key.  Also, the zoom is always zoomed out to the full world.  Also, the mpmeta_errs field is being removed entirely.  (I initially set its value as “0” without the quotes.) Once the last mpmeta_errs field is removed from all posts, the field name itself is being removed from the pulldown list of available fields.

    When I do NOT also specify the lat and lng field values, the map is not generated at all from the syntax shown above for the address field.

    I even tried renaming my address field from “Address” as I had seen it in an example in the documentation, to “address” because I read something about shortcodes filtering everything to lowercase.  Still no luck.

    Can you point me in the right direction to generate descriptively labeled map markers from custom field values? And set the zoom level from custom field values?

    Once I get the kinks worked out I want to upload post data with TurboCSV.

    You can have a look at if that would help.



    Hi Brad,

    Sorry for all the confusion.   I’ll try to answer your questions.  Please also upgrade to the latest 2.38.5 so you have the latest code.

    1.  The plugin assumes if you provide lat/lng then you there’s no street address – incorrect in this case.  I’ll try to fix that in the next beta (2.38.6).  As a workaround you can write your shortcode using the (undocumented) ‘correctedaddress’ parameter to force the plugin to believe the address was geocoded:

    correctedaddress="513 W 7th St, 19805" title="513 W 7th St" iconid="red-dot" point_lat="39.744481" point_lng="-75.554222"

    You’ll want to include city/state in the address.  When you get directions to that address Google will geocode it automatically and without a full address it will ‘guess’.

    2.  For the zoom: when an address is geocoded Google returns the correct viewport to show that address.  For a lat/lng, though, there’s no way for the plugin to know the zoom – you could be displaying a street, state or an entire country.

    You can specify a zoom level (1-19) for the map, though, in the [mappress] shortcode:

    [mappress zoom="5"]

    3.  For the meta field: you can save a dummy post with that ‘errors’ field to keep it in the list.  The plugin is coded to delete the field value if there’s no error (the idea was to let you easily find posts that have errors).  But I think it would make more sense to show “OK” in that field when there’s no error.  I’ll update that in 2.38.6 and also look into adjusting the settings screen to make it easier to use.


    Hi Chris,

    Thanks for the quick reply.

    I did upgrade to Mappress Pro version 2.38.5.

    1. I tried setting the address field value as indicated below (with straight quotes):

    correctedaddress=”513 W 7th St, Wilmington, DE 19805″ title=”513 W 7th St” iconid=”red-dot” point_lat=”39.744481″ point_lng=”-75.554222″

    I also set the value for lat and lng fields.

    The result was tooltip text still showed lat/lng rather than the desired title when displaying that individual post. It would be nice to be able to set the title (and other values) when using lat/lng rather than geocoding.  Maybe in 2.38.6?

    This only affects the individual post with the POI.  On mashup maps that include this post, the tooltip and POI list show the origin post’s title, not the lat/lng.  So, the mashups look fine.  See

    2. I set [mappress zoom="15"] on the individual post.  That worked well and still resulted in only one map, the automatic map, being generated.

    3. I will build a dummy post to ensure that the meta field for errors persists even if all my posts geocode perfectly, or not at all.  It might be more efficient to keep using a dummy post than taking a couple bytes for “OK” on every post.  But I guess worrying about a couple bytes here and there is a bit old school.

    Thanks for a great plugin.

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