# OpenStreetMap marker

**URL:** <https://forum.freecodecamp.org/t/openstreetmap-marker/385991>\
**Category:** General\
**Created:** [May 9, 2020, 2:05am UTC](https://forum.freecodecamp.org/t/openstreetmap-marker/385991 "2020-05-09T02:05:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![shivmoh](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/shivmoh/32/136469_2.png) [@shivmoh](https://forum.freecodecamp.org/u/shivmoh)\
**Post date:** [May 9, 2020, 2:05am UTC](https://forum.freecodecamp.org/t/openstreetmap-marker/385991/1 "2020-05-09T02:05:47Z")

</div>

Hi - I have a below code. I am trying to add a map marker using OpenStreetMap with leaflet. I am not sure if I can write the below marker code without google.maps and use openStreetmap for the below code. I want to avoid using google maps because I am not going to buy Google API key and wanted to use something free to create a map with a marker as I am just learning to create a map project. `f

```auto
unction createMarker(latlng, name, address, index) {`
` var html = "<b>" + name + "</b> <br/>" + address;`
` var marker = new google.maps.Marker({`
` map: map,`
` position: latlng`
` });`

```

the above code gave error, Uncaught ReferenceError: google is not defined  
. then I defined to rectify that error. right now, the error is gone, but in the output, i dont see any marker in map and I get warning message asGoogle Maps JavaScript API warning: NoApiKeys. please suggest and direct me to go right to solve this one.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [May 9, 2020, 7:52am UTC](https://forum.freecodecamp.org/t/openstreetmap-marker/385991/2 "2020-05-09T07:52:33Z")

</div>

I am moving your thread to a more appropriate subforum. Please do not post in #support if you don’t need any help about the platform itself.

---

<div class="post-metadata">

**Author:** ![shivmoh](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/shivmoh/32/136469_2.png) [@shivmoh](https://forum.freecodecamp.org/u/shivmoh)\
**Post date:** [May 9, 2020, 4:07pm UTC](https://forum.freecodecamp.org/t/openstreetmap-marker/385991/3 "2020-05-09T16:07:37Z")

</div>

Hi, I apologize, I am new to this forum. I am not sure which subforum my thread is moved. I thought Javascript is under web development so I posted it here.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [May 9, 2020, 5:35pm UTC](https://forum.freecodecamp.org/t/openstreetmap-marker/385991/4 "2020-05-09T17:35:40Z")

</div>

you didn’t post in #curriculum-help:javascript (even if usually that subforum is about the curriculum challenges), you posted in #support

---

<div class="post-metadata">

**Author:** ![shivmoh](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/shivmoh/32/136469_2.png) [@shivmoh](https://forum.freecodecamp.org/u/shivmoh)\
**Post date:** [May 9, 2020, 6:08pm UTC](https://forum.freecodecamp.org/t/openstreetmap-marker/385991/5 "2020-05-09T18:08:35Z")

</div>

ok, but could you please let me know the link of my post that you moved to curriculum javascript. I tried searching for my post in this forum, but I am not able to see it in javascript forum. Thanks for the help.

---

<div class="post-metadata">

**Author:** ![Naomi](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/naomi/32/422181_2.png) [@Naomi](https://forum.freecodecamp.org/u/Naomi)\
**Post date:** [May 9, 2020, 6:19pm UTC](https://forum.freecodecamp.org/t/openstreetmap-marker/385991/6 "2020-05-09T18:19:19Z")

</div>

It is not in the JavaScript subforum, it is in the Web Development subforum - as you can see by looking at the tag at the top of your post. 🙂

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [June 1, 2021, 6:54pm UTC](https://forum.freecodecamp.org/t/openstreetmap-marker/385991/7 "2021-06-01T18:54:08Z")

</div>


