Skip Navigation

[Resolved] Google Maps Location Accuracy

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

Problem: I would like to display more general map markers so my locations aren't public.

Solution: There is no accuracy setting on maps, so you can use two map markers instead. One marker should be the accurate address, and another marker can be a nearby, more generic address.

Relevant Documentation:
https://toolset.com/documentation/user-guides/display-on-google-maps/displaying-markers-on-google-maps/

This support ticket is created 5 years, 5 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by hui-suanC 5 years, 5 months ago.

Assisted by: Christian Cox.

Author
Posts
#1140409

When building the site I wanted to give the users a choice to have some level of privacy of their location.

I'm thinking of 3 possible solutions:
- Whether it is possible to limit the zoom level
- Change the accuracy of the map to ~1km instead of super accurate
- Using the postal code and changing the last digit to put into the google maps.

I think the last one sounds the most viable, but from what I understand, only "Addresses" can be mapped onto google maps.
Is it possible to use the CRED API to take the Postal code value and save it as an address custom field? or use the API to change the lat/long of the address field slightly?

I know that this is a rather "broad" support question rather than a technical one, but I'm wondering if it is even possible.

#1140703

You might be able to accomplish this on your own with custom JavaScript. The Google Maps API documentation is available here: https://developers.google.com/maps/documentation/javascript/interaction
You can access the JavaScript map objects at WPViews.views_addon_maps.maps or by calling

WPViews.view_addon_maps.get_map('map-123');

Replace map-123 with the actual map ID.

If you want to show a Marker in some location on a Map, you must specify a location. You could create two custom address fields: one for the actual location and another one for some nearby location:

  • actual: 1600 Pennsylvania Avenue Northwest, Washington, DC
  • nearby: Washington D.C., DC
  • Require the user to input both fields. Show the "nearby" field on the map. Use a custom marker graphic that looks like a circle instead of an arrow.

    #1143616

    My issue is resolved now. Thank you!

    #1143701

    Sorry for reopening this ticket. Currently I am trying to generate the nearby field from the first (accurate) address field. It works if I am viewing the map and the address in the backend but the map marker does not show up in the Layouts.

    #1143710

    Whoops, I looked at the help section and added a second Server side Google maps API and it worked.

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