Skip Navigation

[Resolved] Toolset map not showing up marker based on post address field

This thread is resolved. Here is a description of the problem and solution.

Problem:
A View to show results on a Map is not displaying markers from the address field.

Solution:
On this client site the API key was configured incorrectly, as evidenced by the REQUEST_DENIED message when using the Check API button on the Toolset > Settings > Maps page.

Relevant Documentation:
https://toolset.com/documentation/user-guides/display-on-google-maps/creating-a-google-maps-api-key/

This support ticket is created 5 years, 9 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 4 replies, has 2 voices.

Last updated by William Locatelli 5 years, 9 months ago.

Assisted by: Nigel.

Author
Posts
#952094

I am trying to show event on map but when i use marker based on post address field nothing happened.

Here the code into Loop Editor

[wpv-layout-start]
	[wpv-items-found]
[wpv-map-render map_id="map-1"][/wpv-map-render]
<!-- wpv-loop-start -->
		<wpv-loop wrap="3" pad="true">
          [wpv-map-marker map_id='map-1' marker_id='marker-2' marker_field='wpcf-indirizzo'][/wpv-map-marker]
		[wpv-item index=1]
		<div class="row ">
			<div class="col-sm-4">[wpv-post-body view_template="Loop item in Tutti gli eventi"]</div>
		[wpv-item index=other]
			<div class="col-sm-4">[wpv-post-body view_template="Loop item in Tutti gli eventi"]</div>
		[wpv-item index=3]
			<div class="col-sm-4">[wpv-post-body view_template="Loop item in Tutti gli eventi"]</div>
		</div>
		[wpv-item index=pad]
			<div class="col-sm-4"></div>
		[wpv-item index=pad-last]
			<div class="col-sm-4"></div>
	</wpv-loop>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-pager-nav-links output="bootstrap" first_last_links="true" previous_next_links="true" text_for_first_link="Prima" text_for_last_link="Ultima"]
[wpv-layout-end]	

If i use a specific postal address outside of the loop works fine.

#952276

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Screen Shot 2018-07-20 at 13.19.35.png

Hi there

I could see the issue on your site.

I went to Toolset > Settings > Maps and used the Check API button to test your API key, and as you can see in the screenshot it is not valid for requests from your site.

Please double-check our documentation about setting up your API key: https://toolset.com/documentation/user-guides/display-on-google-maps/creating-a-google-maps-api-key/

#952294

Thanks Nigel!
I followed the guide and boom! Works great! I didn't enable all the Google Maps API.

Another question... is ti possible extract only city name from address field?

#952301

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi William

I described how to do something similar—extract the zipcode—in another thread which you can check to see if you can convert it to your use case of extracting the city.

Another user added a more generic solution to the end which may help.

https://toolset.com/forums/topic/separating-content-from-the-address-field/

If you need help can you please open a new ticket specific to that problem, thanks.

#952313

Thanks NIgel but it goes beyond my programming skills 🙂

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