# Google maps from and to with distance.

**URL:** <https://forum.wixstudio.com/t/google-maps-from-and-to-with-distance/2362>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [November 28, 2021, 9:29pm UTC](https://forum.wixstudio.com/t/google-maps-from-and-to-with-distance/2362 "2021-11-28T21:29:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![info95363](https://avatars.discourse-cdn.com/v4/letter/i/c89c15/32.png) [@info95363](https://forum.wixstudio.com/u/info95363)\
**Post date:** [November 28, 2021, 9:29pm UTC](https://forum.wixstudio.com/t/google-maps-from-and-to-with-distance/2362/1 "2021-11-28T21:29:57Z")

</div>

I have created the following code that works fine outside of Wix:

 Route 

I cannot get this to work inside of Wix. I have tried a number of support answers and they ask for things such as repeaters that do not exist. I have created packages, imported functions and it just will not work.

I cannot be the only one who has asked for this and are there detailed instruction on how to get this to work.

---

<div class="post-metadata">

**Author:** ![yisrael-wix](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/yisrael-wix/32/1107_2.png) [@yisrael-wix](https://forum.wixstudio.com/u/yisrael-wix)\
**Post date:** [November 29, 2021, 9:21am UTC](https://forum.wixstudio.com/t/google-maps-from-and-to-with-distance/2362/2 "2021-11-29T09:21:45Z")

</div>

All code in Wix Velo is Javascript, however you don’t have access to the DOM. You can add HTML into your site, however it has to be either through an [HtmlComponent](https://www.wix.com/velo/reference/$w/htmlcomponent) or a [Wix Custom Element](https://support.wix.com/en/velo-by-wix/wix-custom-element-with-velo) .

Refer to the [Google Maps example](https://www.wix.com/velo/forum/tips-tutorials-examples/example-multiple-markers-google-maps) to see one possible way to add a Google Map to your site.

---

<div class="post-metadata">

**Author:** ![info95363](https://avatars.discourse-cdn.com/v4/letter/i/c89c15/32.png) [@info95363](https://forum.wixstudio.com/u/info95363)\
**Post date:** [November 29, 2021, 7:04pm UTC](https://forum.wixstudio.com/t/google-maps-from-and-to-with-distance/2362/3 "2021-11-29T19:04:19Z")

</div>

Thanks 😁, I thought you had to leave out the head etc. I Put that in and it works fine.
