Forums

Ajax Event Calendar
[resolved] Change parameters of View map link (3 posts)

  1. tangopuss
    Member
    Posted 7 months ago #

    At present the view map link to google maps takes its query as
    q=Neighborhood or Street Address+Postal Code

    This does not give me as accurate a pinpoint as q=Postal Code on its own but I would still like to display the Neighborhood or Street Address in the event form.

    How can I edit the query to make q=Postal Code but still display the Neighborhood or Street Address in the event form?

    http://wordpress.org/extend/plugins/ajax-event-calendar/

  2. Eran Miller
    Member
    Posted 7 months ago #

    If you are willing to exclude street address from all map links, you can edit show_events.php as follows. Otherwise, what you ask is not available.

    Change this:

    // google map link
    if ($aec_options['show_map_link']) {
      $out .= "<a href='http://maps.google.com/?q=" . urlencode($event->address . " " . $csz . " " . $event->country) . "' class='round5 aec-maplink cat{$event->category_id}'>" . __('View Map', AEC_NAME) . "</a>\n";
    }

    To this:

    // google map link
    if ($aec_options['show_map_link']) {
      $out .= "<a href='http://maps.google.com/?q=" . urlencode($csz . " " . $event->country) . "' class='round5 aec-maplink cat{$event->category_id}'>" . __('View Map', AEC_NAME) . "</a>\n";
    }
  3. tangopuss
    Member
    Posted 7 months ago #

    Thank you Eran for a prompt and clear response. I am impressed.

    I guessed it was in that section but I didn't know how much to remove.

    I have already edited the code as you explained and it works perfectly.

    Thanks again.

Reply

You must log in to post.

About this Plugin

About this Topic