Skip Navigation

[Closed] Zoomed out toolset map but keep the map marker centered

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 8 replies, has 1 voice.

Last updated by Minesh 2 weeks, 4 days ago.

Assisted by: Minesh.

Author
Posts
#2835934

Tell us what you are trying to do?
I want to zoom out the map a bit, but keep the map marker centered

Is there any documentation that you are following?
https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#wpv-map-render

Is there a similar example that we can see?

What is the link to your site?
hidden link

#2835957

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

I click on the zoom out button and I can see map marker remains in center.

Am I missing anything here? Maybe if you can share few screenshots or video should help me to understand your issue.

In addition to that - Could you please send me debug information that will help us to investigate your issue.
=> https://toolset.com/faq/provide-debug-information-faster-support/

#2835970
Reference default zoom in Beaver PowerPack.png
Desired zoom upon open.png
Current default zoom upon open.png

Hi Minesh

Sure, happy to explain further.

You're right that the zoom out button works, but we'd like it to be more zoomed out by default when the map opens, without the user having to click the button to do it manually.

It seems unusual that the map is extremely zoomed in by default, and the client reported it to us as an issue they want to fix. It would be more intuitive / normal to see the local area around the map marker, to contextualise its location more easily.

I've attached 3 files for extra reference -

1) "Current default zoom upon open" showing the current default
2) "Desired zoom upon open" showing roughly how we would prefer it to look by default
3) "Reference default zoom in Beaver PowerPack" showing how the Google Map looks by default on our own website's Contact page for example (hidden link) where we use a different plugin called Beaver PowerPack instead of Toolset - and you can see the local area around our office by default, instead of the map being extremely zoomed in to only the immediate street.

Thanks in advance for your help.

Ben

#2836113

Minesh
Supporter

Languages: English (English )

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

Ok - I got it, you want to set the default zoom level.

Can you please share admin access details and let me review your current map settings and see what could be the best possible solutin in your case.

*** 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.

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

#2836581

Minesh
Supporter

Languages: English (English )

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

I checked the problem URL you shared:
- hidden link

I found that you are using the following view to display the map:
- hidden link

It looks like one pin but it does not, it loops through the view loop and actually on map there were multiple markers added on map on the same spot. Is that correct?

Also, I found that you added the markers shortcocde as given under:

 [wpv-map-marker map_id='map-2' marker_id="marker-8" marker_title='Content Here' marker_icon='//dev.erjjiostudios.com/nfrar/wp-content/uploads/custom-pin.png' marker_field='wpcf-address-map-pin']
 

When you have multiple markers added on map the marker_id should be unique and to make unique maker ID, I've adjusted the above code as given under:

 [wpv-map-marker map_id='map-2' marker_id="marker-[wpv-user field='ID']" marker_title='Content Here' marker_icon='//dev.erjjiostudios.com/nfrar/wp-content/uploads/custom-pin.png' marker_field='wpcf-address-map-pin']

I would like to know do you want to display multiple markers on the map or single marker?

#2836583

Hi Minesh

Thanks so much - in this particular part of the site for individual user profiles that we're asking about here, we only want to display a single marker - to show where that user is located.

FYI though, elsewhere on the site we show search results for users, where we show multiple users as clusters on a map.

Best

Ben

#2836586

Minesh
Supporter

Languages: English (English )

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

I would like to know are you using the same view on any other page/post, I mean other part of the website?
- hidden link

If no, I will set the filter to above view to filter the view result with the current user profile ID.

#2836587

Hi Minesh - it's a template user profile post - there are lots of registered users on the site, each with their own user profile post which uses this template. Each user has their own address, and therefore the map template gets populated with the user's respective location on the map.

Other than that, we don't use the map view elsewhere on the site - it's only for these dynamically populated user profile posts.

Does that answer your question?

#2836739

Minesh
Supporter

Languages: English (English )

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

For instance, you are on the following user profile post:
- hidden link

When I edit the above post:
- hidden link

I can see the fields like country, address etc..etc. - I would like to know do you store the same address with user custom field as well that you can see with the above edit post with custom address field? if yes,

Why dont you make a content template or lets say post type view insetead of user view?

The topic ‘[Closed] Zoomed out toolset map but keep the map marker centered’ is closed to new replies.