Advertisement:

Author Topic: Google map in search page  (Read 1165 times)

Adyyda

  • Sr. Member
  • ****
  • Posts: 435
Google map in search page
« on: May 23, 2015, 10:38:17 pm »
Hello. I would like to know if is posible to show the map for each item on search page.
In item.php this is the code that deals with the map
Code: [Select]
<?php osc_run_hook('location'); ?>
So, is it posible to show the map on click for each item by click on a link? Thanks

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: Google map in search page
« Reply #1 on: May 24, 2015, 03:22:23 pm »
I do not understand what you are asking here, please be SPECIFIC as possible..... a link, clicking search page item page.... ???

Adyyda

  • Sr. Member
  • ****
  • Posts: 435
Re: Google map in search page
« Reply #2 on: May 24, 2015, 04:00:25 pm »
In search page we have listings dislayed as grid/list (bender theme)
I would like to have a link called Map on each of those listings and when i click on it, show the map coresponding to that listing. In other words, have the item map from item.php called and displayed for each listing in search.
The map can be made visible / invisible with http://forums.osclass.org/plugins/google-maps-with-hideshow/30/

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: Google map in search page
« Reply #3 on: May 24, 2015, 04:11:53 pm »
ok, so in search page with the ads you want to show a link showing the word 'Map' and then when clicked a pop-up form should be opened with google map of the item's location?

Adyyda

  • Sr. Member
  • ****
  • Posts: 435
Re: Google map in search page
« Reply #4 on: May 24, 2015, 04:13:12 pm »
Yes

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: Google map in search page
« Reply #5 on: May 24, 2015, 04:20:14 pm »
Well, showing the link can be done by using the <a href=""> html code on the search page items.
The link should open a pop-up form with that php google maps code part to show the item's location on map.

Sorry can't give you the code out of the box.

Adyyda

  • Sr. Member
  • ****
  • Posts: 435
Re: Google map in search page
« Reply #6 on: May 24, 2015, 04:35:20 pm »
I do know how to make a link or a button. What i do not know is how to show the map.
To make it even easy, how can i show the map after details of each listing (in search page - grid/list mode), whithout any link or popup?

I am asking because in item.php we can place <?php osc_run_hook('location'); ?> in any area and the map will show (even in sidebar), but placing <?php osc_run_hook('location'); ?> in loop-single.php doesn't show the map in search

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: Google map in search page
« Reply #7 on: May 24, 2015, 04:47:09 pm »
It means it is item page related.... so outside needs changes but I don't know the answer without having to spend time I don't have right now, sorry.

Maybe someone already has done this and can help out.....


Regards,
Eric