Skip Navigation

[Resolved] Maps not displaying in the 'correct' position

This support ticket is created 5 years, 3 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 6 replies, has 2 voices.

Last updated by Minesh 5 years, 3 months ago.

Assisted by: Minesh.

Author
Posts
#1306485

The Google maps integration API seem to be working ok.
I have a custom type 'HED Jobs' containing the Address Field for Toolset Maps
I have a 'View' to display a map.
'HED Jobs' Type has an Elementor Pro Template

However, although the maps ARE displaying on the front-end they are not in the correct position.

See this 2 min video for clarity:

hidden link

I have a login set up ready for you

#1306693

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

After reviewing the video you shared I see that you did not added map correctly.

You should add the map shortcode out side the <wpv-loop> and also you need to add map marker shortcode.

If you can pass me access details I will try to quickly add it for you.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1306887

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

OK - I've adjust the Map code within the view you created as you can see here:
=> hidden link

[wpv-layout-start]
	[wpv-items-found]
	<!-- wpv-loop-start -->
[wpv-map-render map_id="map-1" map_type_control="off" marker_icon="//drawingstudio.co.uk/wp-content/uploads/2019/07/map-pin.svg"][/wpv-map-render]
		<wpv-loop>
          
        [wpv-map-marker map_id='map-1' marker_id='marker-[wpv-post-id]' marker_field='wpcf-property-address'][/wpv-map-marker]
		</wpv-loop>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]No map found yet![/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-layout-end]

In addition to that, I've added my test google map api key and I can see the map is working on frontend:
=> hidden link

Please remove my test API key and you should create unrestricted google map API key. Do not attach your map api key with any specific domain.

#1306903

Hi Minesh

Thanks for your help here. We are making some progress now but ALL of the 'HED Job' Type Posts are still showing the same location on the map, although this location IS in Welwyn Garden City which is closer than before 🙂

See:

hidden link
hidden link
hidden link
etc

----

API
I am very hesitant to attach my map api key 'without' any specific domain restrictions...surely that 'should' not make a difference to the system and WILL protect me against hackers finding and using my API?

Cheers
---
John

#1306971

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I see few javascript errors on the browser's console when I try to edit the elementor template you created:
=> hidden link

I saw the error Google map API key loaded multiple times and its due to the addon you are using which loads google map API key - I disabled that JS loading:
=> hidden link

As well as premium maps form the following page:
=> hidden link

Still - I see there is javascript error on browser's console that is coming from elementor plugin:

Can you please try to delete the map block - once you delete it, you will notice that within the elemenotor's widget's box its not loaded and keep loading.
=> hidden link

What if you share a brand new elementor template where I can show you how to add maps. You want that map should load the current address of post - correct?

#1307635

I have updated the offending plugin so what do we do now?

The Elementor Widget Panel is now loading OK.

#1307637

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

hidden link
hidden link
hidden link
==> Can you please check now the above posts.

I've added the following query filter to your view:
=> hidden link

Post ID filter
Include only posts with IDs set by the View shortcode attribute "ids" eg. [wpv-view name="view-name" ids="1"]

Then, I've created the following content template where I've added the view as given under:
=> hidden link

[wpv-view name="property-location-map" ids="[wpv-post-id]"]

And then on the elementor's template I've added the above content templae using shortcode module::
=> hidden link

[wpv-post-body view_template="ct-to-display-map-view-on-hed-jobs"]

I can see its working. Can you please confirm.