• Resolved Klokwerk-design

    (@klokwerk-design)


    First of all many compliments for this plugin. I bought the pro-version for the mashups, just as my client needed it. Two questions, however.

    1. Is there a way to display the location of a post in the template. I looked for shortcodes but it’s just not there. I’m afraid this is missing functionality but maybe I’m wrong. If not, that might be a request for future functionality. You see, my client lists in a map the coolest hotspots in Amsterdam, but clicking on a hotspot she desires to have the address and a little map of the hotspot displayed. I think it’s logic. But I can’t find the functionality.

    2. Is there a way to alter the information given in the popup? Right now I see the post-title, the thumbnail and part of the content, and a continue-reading-link. I’d rather see the post-title, the address, the excerpt, and an continue-reading-link. Is that possible or should that, again, be a request for future functionality?

    Looking forward to your answer,
    regards,
    Kees Alders, Klokwerk-design

    https://www.ads-software.com/plugins/google-maps-builder/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Matt Cromwell

    (@webdevmattcrom)

    Hi there,

    1) If I understand you correctly, you want a list of all the markers to appear below the map? Is that right? If so, that is a feature request that we’re working on.

    2) Customizing the popup content is another thing we’re working on for the next version. I can’t promise a date on when either of those are released but we’ll be doing more dedicated development towards those features after the New Year.

    Also, your questions seem to be regarding the Pro version. We have priority support available here: https://wordimpress.com/support/forum/maps-builder-pro

    Thanks!

    Thread Starter Klokwerk-design

    (@klokwerk-design)

    Wow, that was really quick, thank you.

    However, I think my first question was not very clear, sorry for that. What I’d really want, is to have a map appeared in the single post page, and if possible the address lines. So, a map containing that specific marker only. I guess the map would take some more functionality, because obviously a post-location is not a map yet, but maybe there’s a way that I can call the address-line that’s visible in the backend at the individual post?

    Plugin Author Matt Cromwell

    (@webdevmattcrom)

    Ya, we don’t support that currently. But it’s an interesting idea for sure. It might not be too difficult to implement via your CPT template file though.

    Still, that is custom development that is outside the realm of our support.

    Thanks!

    Thread Starter Klokwerk-design

    (@klokwerk-design)

    I see I was too fast: on your priority support forum I saw a post just one month old by anyone asking the exact same thing. And a link to a GitHub page with some interesting information. Thanks a lot for your answers, and good luck developping this plugin!

    Thread Starter Klokwerk-design

    (@klokwerk-design)

    Maybe it’s useful for others to share my code:

    <!-- First, fix the address and display it on two lines -->
    <?php
    $address  = $post->_gmb_address;
    if ($address!="") {
    	$Chunks = explode(",", $address);
    	echo $Chunks[0]."<br />";
    	echo $Chunks[1]."<br />";
    }
    ?>
    
    <!-- Placeholder for the Google Map -->
    <div id="map" style="height: 200px; margin-bottom: 24px;">
      <noscript>
        <!-- https://code.google.com/apis/maps/documentation/staticmaps/ -->
        <img src="https://maps.google.com/maps/api/staticmap?center=1%20infinite%20loop%20cupertino%20ca%2095014&zoom=16&size=512x512&maptype=roadmap&sensor=false" />
      </noscript>
    </div>
    
    <script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>
    <script type="text/javascript">
    
    // Define the address
          var address = <?php echo json_encode($address); ?>;
    
    // Locate the address using the Google Geocoder
    var geocoder = new google.maps.Geocoder();
    geocoder.geocode( { "address": address }, function(results, status) {
    
      // If the Geocoding was successful
      if (status == google.maps.GeocoderStatus.OK) {
    
        // Create a Google Map at the latitude/longitude returned by the Geocoder.
        var myOptions = {
          zoom: 13,
          center: results[0].geometry.location,
          mapTypeId: google.maps.MapTypeId.ROADMAP
        };
        var map = new google.maps.Map(document.getElementById("map"), myOptions);
    
        // Add a marker at the address.
        var marker = new google.maps.Marker({
          map: map,
          position: results[0].geometry.location
        });
    
      }
    });
    </script>

    It took me some time but it’s working fine ;).

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Mashup descriptions and post location template tags’ is closed to new replies.