Map with Looper

I saw that i can get a looper working with a Map. i wanted to know though how could i pass the info to the looper so it would take a specific field that contains the google address. the field is a custom field from toolset and it’s inside a custom post type (this part is the one that is confusing me).

Is there a way to do it without the query builder or i need it to make it work? i’m a bit dusty with the looper concept (never really got around it) and i wanted to take this opportunity to use it.

Hi Frantic,

Thanks for reaching out.
If I am able to understand it, you are trying to create a Map inside a Looper Provider? If that is correct, you need to set the meta value to the Lattitude and Longitude using the Dynamic Content tag inside the Looper.
I would suggest you go through the following article and the thread, which may help you with this.


Thanks

i had read that, so, that means that instead of teh address i need to add lat and long? and in that case, the provider would be the map element and the consumer the marker elements?

that’s mainly my doubt. there are 50 pages containing both google address and/or lat/long, so that part is ok, but these pages are actually a post type called “map”, a custom post type i created that contain everything: description in side the map, names and other details.

So, let me structure my first question into something clearer to understand:

  • Do i have to set the map as a looper provider and 1 marker as the looper consumer?
  • Can i feed the info from a custom post type without the query builder or do i need to use the query builder for that?

Let’s start with those 2 questions first.

Hi Frantic,

Yes, you can set the Looper Provider to the Map and set the Looper Consumer to the Map Marker. And you can set the dynamic content values wherever the icon is showing, as per the screenshot given below.

image

Your second question is not very clear; if you want to set information to the content attribute, you need to do it through the Looper Provider.

Hope it helps.
Thanks

About the second question.

Let me put it another way:

  • I have a CPT called “maps”
  • In there i have map elements with the coordinates (lat and long).

How would i hypothetically set the provider to get the content from the “maps” and not the posts or the pages?

Hi Frantic,

You can use the Query Builder or Query String and set the Post Type to the Map. And the rest will work as it is, like Post. I would suggest you go through the following article, which may help.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.