Title: set function getBrowserLocation
Last modified: December 12, 2017

---

# set function getBrowserLocation

 *  [Mr.Mirko](https://wordpress.org/support/users/depaoli/)
 * (@depaoli)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/set-function-getbrowserlocation/)
 * Dear colleagues,
 * is it possible to set function getBrowserLocation within the plugin?
 * If not, could I set it somewhere else?
 * Kind regards,
 * Mirko

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [bozdoz](https://wordpress.org/support/users/bozdoz/)
 * (@bozdoz)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/set-function-getbrowserlocation/#post-9776006)
 * Hmmm, It’s an interesting idea. I wonder what you would want to do with the user
   location. Or how you want to use it. I’m thinking something like this:
 * [leaflet-map address=”Default Location” getUserLocation=”true”]
 * But I’m not sure how useful this might be. I suppose you could try to add a marker
   to their location, but why? Maybe:
 * [leaflet-marker getUserLocation=”true”]
 * If they refuse then the marker could be deleted, for example. Not sure. Let me
   know what you would want it for and how you picture it working in the post shortcodes.
 *  Thread Starter [Mr.Mirko](https://wordpress.org/support/users/depaoli/)
 * (@depaoli)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/set-function-getbrowserlocation/#post-9777913)
 * Thanks for the quick reply.
 * I’d like to set the position of the map to the website visitor’s position so 
   he can see the marker in his surrounding first.
 * So, if I understand you right I have to put the code you suggested in my own .
   js
    and it can’t be set in the dashboard options, right?
 *  Plugin Author [bozdoz](https://wordpress.org/support/users/bozdoz/)
 * (@bozdoz)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/set-function-getbrowserlocation/#post-9779989)
 * Well that’s part of my question. How would you expect it to work? Does it make
   sense to do it in the admin where it would be site-wide, or is it better to do
   it map by map (and/or for markers), like the shortcode ideas I wrote up top? 
   Or is there some other way that makes more sense? Let me know what you think!
   I think it’s a good idea.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘set function getBrowserLocation’ is closed to new replies.

 * ![](https://ps.w.org/leaflet-map/assets/icon-256x256.png?rev=1693083)
 * [Leaflet Map](https://wordpress.org/plugins/leaflet-map/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/leaflet-map/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/leaflet-map/)
 * [Active Topics](https://wordpress.org/support/plugin/leaflet-map/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/leaflet-map/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/leaflet-map/reviews/)

## Tags

 * [function](https://wordpress.org/support/topic-tag/function/)

 * 3 replies
 * 2 participants
 * Last reply from: [bozdoz](https://wordpress.org/support/users/bozdoz/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/set-function-getbrowserlocation/#post-9779989)
 * Status: not resolved