Skip Navigation

[Resolved] Maps not showing markers in some cases

This support ticket is created 7 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 11 replies, has 2 voices.

Last updated by nickH-5 7 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#425381

I am trying to: place markers against addresses for a custom post type (location).

Since I changed to creating post body and past title as part of the location, maps show markers fine on entry front end or back end but not in the content template shown to users. Older locations (when I used a separate text field for both location name and body text instead of post title and post body) show the markers fine but new ones don't.

Here is the template:

[wpv-post-title output='sanitize']

[wpv-post-featured-image size='medium']

[wpv-post-body view_template='None']

[wpv-map-render map_id='map-5']

[wpv-map-marker map_id='map-5' marker_id='marker-5' marker_field='wpcf-address'][/wpv-map-marker]

[types field='address'][/types]

[types field='phone-number'][/types]

[types field='email-address'][/types]

[types field='opening-times' separator=', '][/types]

[types field='website' title='Website' target='_blank'][/types]

You can see the output by going to hidden link, scroll to the bottom, click on Great Italian deli to see one which works and Verulam Arms to see one which doesn't.

#425478

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nick,

Thank you for contacting our support forum.

This issue could be happening because you may not have an API key installed in your maps plugin.

You can generate your api key by following the instructions in the link below.

https://toolset.com/documentation/user-guides/data-caching-for-google-maps-addresses-2/

Thanks,
Shane

#425551

Thanks Shane.

That's not the case. I have a Maps API in and it is functioning fine. This is consistently occurring on newer entries and consistently not occurring on older ones.

Am I misunderstanding custom post types? The only thing I have recently changed on these "Location" types is that I have made the location name a post title and the description a post body instead of being separated text fields. Could this be the issue and if so, why?

Thanks again.

Nick.

#425588

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nick,

The only way to test this or confirm that this is the issue is by changing it back to what it was before and see if the issue remains then .

Once you have done this please let me know.
Thanks,
Shane

#425874
map problem backend fine.png
map problem.png

OK I did that and now I have completely recreated a custom post type (Locations2). Exactly the same thing is happening. Anything I create is showing a map with a correct marker on front end entry and in the backend, but not on the single post page.

#425916

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nick,

Would you mind providing me with admin access to the website so that I can have a look ?

The private fields will be enabled for your next response.

Thanks,
Shane

#426015

Shane

You should also know that the wordpress updater is having trouble updating Views from 1.1 to 1.1.1. It gets as far as Updating Plugin Toolset Views (1/1) and hangs.

Getting a bit fed up now 🙂

#426016

Correction - 2.1 to 2.1.1

#426132

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nick,

I highly suspect that the problem is originating from your API Key.

Did you restrict your API key to your domain only when you were creating it ?

Please let me know.
Thanks,
Shane

#426141

Thanks. I have removed all domain restrictions, I am not getting any errors in the Javascript console and I still have the problem. Do I need to verify domain ownership with Google also?

#426143

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nick,

I've created an unrestricted API key and added it to your site and it starts working.
hidden link

What I recommend that you do is to create and unrestricted key. If you want to continue using restrictions you need to enter the website EXACTLY like this *localhost:8888/real_estate/* including the * and trailing slash at the end.

Please let me know if this helps.
Thanks,
Shane

#430163

Thanks a lot Shane and sorry for the delay in replying.

You're right but for some reason even using *welovestalbans.com/* blocks the requests so I've have left the API open to all domains. Maybe the instructions/troubleshooting could be updates to be clearer on the issue here.

Thanks for all your help.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.