WordPress.org

Ready to get started?Download WordPress

Forums

Comprehensive Google Map Plugin
Marker tooltip text (4 posts)

  1. ecomlearning
    Member
    Posted 1 year ago #

    This plugin does 99% of what I want and lots that I do not need at the moment so I'm sure that this last 1% is easy to fix.

    I have a marker positioned by lat/lng coordinates. It's all great apart from when you hover over the marker the tooltip says "Lat/Long: xxx,xxx".
    What I want it to say is the name of the location as provided by me.

    I have used the Google Maps API outside of a system like WordPress so I know it can only take a small bit of JavaScript:

    var MyMarker = new google.maps.Marker({
    position: MyLatLng,
    map: MyMap,
    title: "Tooltip popup text on mouse hover",
    icon: MyIcon,
    });

    I just can't figure out how to get the 'title' in CGMP.

    Any help would be much appreciated.

    http://wordpress.org/extend/plugins/comprehensive-google-map-plugin/

  2. digitalrenewal
    Member
    Posted 1 year ago #

    this is exactly what I need to know too. I built a local directory site pretty much powered by this plugin, which is awesome. Looks pretty smooth too. http://historicdepot.com/

    Im using a 'Geo Mashup' on the home page to display all of the local businesses. So the home page is just a map, with markers, but no real information about what's what until you click the marker. I think visitors might be kinda lost. A hover with the page title would be ideal in this situation.

    Hoping someone can help!

  3. Mark Cobbold
    Member
    Posted 1 year ago #

    It would be great to choose the text or get rid of the tooltip completely.
    Please let us know if that's possible.
    http://portenta.com/contact

  4. DA2206
    Member
    Posted 1 year ago #

    Hi,

    I have a database with the latitudes and longitudes of locations. I pass these to the plugin in a list through the shortcode and it displays the tooltips with the latitudes and longitudes. The record in the database that contains these latitudes and longitudes also contains the place name.

    It would be useful if anyone reading this knew how to effectively get the place name where latitude and longitude in the database = the latitude and longitude of the map marker, and display this place name as the tooltip.

    Aside from this, Mark, if you go to the file '\comprehensive-google-map-plugin\assets\js\cgmp.framework.js' and locate the function 'function instrumentMarker(point, element)', inside this you should be able to set the 'title:' to be "". Effectively a blank string that will cause the tooltip not to show.

    Of course, if you are using this as your only map on the site then you can edit the 'title:' and 'content:' lines to read the following:

    title: "PORTENTA Limited",
    content: "Unit 270<br/>88 Lower Marsh<br/>Waterloo<br/>London<br/>SE1 7AB",

    Let me know if this helps.

    Dan

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic