1. davidunwin
  2. Support
  3. Monday, March 02 2020, 02:41 PM
We ask all our users to enter their location (home) address. We also have our own location (venue). We want to be able to display a map with all our users within say 5km of our venue. It would be nice if we could have a map centered on our location displaying all users with 5 or 10km from our our location. Is it possible to center the map on a set of coordinates?
Accepted Answer
admin Accepted Answer
Admin
Hi,
user map module set zoom (and center) automatically based on all displayed markers. So from your screenshot seems that you have only 1 result.

If you want to set a specific zoom level when you have only 1 result then you can follow there steps:
- Copy file from /modules/mod_jsnmap/tmpl/default.php to /templates/your-template-folder/html/mod_jsnmap/default.php
- Edit new file, change the code at line 148 from
jsnmap<?php echo $module->id; ?>.setZoom(17);
to
jsnmap<?php echo $module->id; ?>.setZoom(8);
  1. more than a month ago
  2. Support
  3. # Permalink
davidunwin Accepted Answer
Ok,
I think I have found part of the answer. Use the filter by coordinates option=yes. see screen shot
This works but I cannot set the initial zoom of the map or see our location (which is set in the coordinates values). The inital zoom is very high (see screen shot)
Is there any way I can set the initial zoom and show our location (that set in the coordinates values)?
Thanks
  1. more than a month ago
  2. Support
  3. # 1
davidunwin Accepted Answer
Thanks for for the quick reply.
RE ' So from your screenshot seems that you have only 1 result.'
Yes, that is true as I am just testing theis feature on our test site which has only a few users and I set the limit 5km which meant only one dsiplayed.
I will try the fix you suggested.
Thnaks
  1. more than a month ago
  2. Support
  3. # 2
davidunwin Accepted Answer
Ok, Your fix for zoom level works great.....Thank you so much.
One other question. We use the filter by coordiates. The coordiantes relate to our venue(location) - see screen shot.
Is there anyway we could place a marker (in a different colur or shape) on the map of our location using the coordiantes or some other method?
  1. more than a month ago
  2. Support
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.