# Get location coordinates when clicking on maps

**URL:** <https://forum.wixstudio.com/t/get-location-coordinates-when-clicking-on-maps/34760>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [September 30, 2022, 9:50am UTC](https://forum.wixstudio.com/t/get-location-coordinates-when-clicking-on-maps/34760 "2022-09-30T09:50:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mauro-bagnato](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/mauro-bagnato/32/24817_2.png) [@mauro-bagnato](https://forum.wixstudio.com/u/mauro-bagnato)\
**Post date:** [September 30, 2022, 9:50am UTC](https://forum.wixstudio.com/t/get-location-coordinates-when-clicking-on-maps/34760/1 "2022-09-30T09:50:44Z")

</div>

Hi,

when I click on a specific location in a google map, I would like to retrieve the relative coordinates. Is that possible?

Thanks

---

<div class="post-metadata">

**Author:** ![CODE-NINJA](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/code-ninja/32/110588_2.png) [@CODE-NINJA](https://forum.wixstudio.com/u/CODE-NINJA)\
**Post date:** [October 2, 2022, 9:15pm UTC](https://forum.wixstudio.com/t/get-location-coordinates-when-clicking-on-maps/34760/2 "2022-10-02T21:15:27Z")

</div>

> **[Example: Multiple Markers Google Maps | Velo by Wix](https://community.wix.com/velo/forum/tips-tutorials-examples/example-multiple-markers-google-maps)**
>
> \#Example #GoogleMaps #MultipleMarkers #MarkerClustering #CustomControls #HtmlComponent #APIKey #security
> 
> Demonstrates
> • HtmlComponent
> • Google Maps Javascript API
> Required for this example
> • In order to use this example in the editor, you will need...

---

<div class="post-metadata">

**Author:** ![mauro-bagnato](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/mauro-bagnato/32/24817_2.png) [@mauro-bagnato](https://forum.wixstudio.com/u/mauro-bagnato)\
**Post date:** [October 3, 2022, 7:54am UTC](https://forum.wixstudio.com/t/get-location-coordinates-when-clicking-on-maps/34760/3 "2022-10-03T07:54:16Z")

</div>

Thx. I assume that there is no way to do it without using HTMLComponent, right?

---

<div class="post-metadata">

**Author:** ![CODE-NINJA](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/code-ninja/32/110588_2.png) [@CODE-NINJA](https://forum.wixstudio.com/u/CODE-NINJA)\
**Post date:** [October 3, 2022, 10:50am UTC](https://forum.wixstudio.com/t/get-location-coordinates-when-clicking-on-maps/34760/4 "2022-10-03T10:50:23Z")

</div>

Take a look onto this one…  
[https://www.wix.com/velo/reference/$w/googlemap/location](https://www.wix.com/velo/reference/$w/googlemap/location)

---

<div class="post-metadata">

**Author:** ![mauro-bagnato](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/mauro-bagnato/32/24817_2.png) [@mauro-bagnato](https://forum.wixstudio.com/u/mauro-bagnato)\
**Post date:** [October 3, 2022, 11:34am UTC](https://forum.wixstudio.com/t/get-location-coordinates-when-clicking-on-maps/34760/5 "2022-10-03T11:34:15Z")

</div>

thx again.  
I need to fetch the location when i click on the marker on the map because  
I will use the location to fetch other information and display them as a box on the map.  
Basically I would need an onClick on the location marker unless there is another way that I cannot see…

---

<div class="post-metadata">

**Author:** ![CODE-NINJA](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/code-ninja/32/110588_2.png) [@CODE-NINJA](https://forum.wixstudio.com/u/CODE-NINJA)\
**Post date:** [October 3, 2022, 1:22pm UTC](https://forum.wixstudio.com/t/get-location-coordinates-when-clicking-on-maps/34760/6 "2022-10-03T13:22:31Z")

</div>

The google-map out of the Wix-Box won’t make you happy.

Why?

1. single-location-point only (no possibility to set multiple-pins on map)
2. no click-event-option onto the marker

All you can do on the provided version is.  
[https://www.wix.com/velo/reference/$w/googlemap/location](https://www.wix.com/velo/reference/$w/googlemap/location)

You will have to go the CUSTOM-WAY (like in most cases) if you want to generate your own wished functionality on your page.

This is your way to success…

> **[Example: Multiple Markers Google Maps | Velo by Wix](https://community.wix.com/velo/forum/tips-tutorials-examples/example-multiple-markers-google-maps)**
>
> \#Example #GoogleMaps #MultipleMarkers #MarkerClustering #CustomControls #HtmlComponent #APIKey #security
> 
> Demonstrates
> • HtmlComponent
> • Google Maps Javascript API
> Required for this example
> • In order to use this example in the editor, you will need...

1. Implement an HTML-Component onto your site.
2. Register on GOOGLE-MAPS to get a access-token/key
3. Follow the instructions of the shown EXAMPLE.

---

<div class="post-metadata">

**Author:** ![mauro-bagnato](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/mauro-bagnato/32/24817_2.png) [@mauro-bagnato](https://forum.wixstudio.com/u/mauro-bagnato)\
**Post date:** [October 3, 2022, 2:23pm UTC](https://forum.wixstudio.com/t/get-location-coordinates-when-clicking-on-maps/34760/7 "2022-10-03T14:23:19Z")

</div>

Ok I see. Thanks again for the prompt answer. Will try to make it work 🙂
