# Map API library?

**URL:** <https://community.haxe.org/t/map-api-library/3518>\
**Category:** Haxe\
**Created:** [April 15, 2022, 3:56pm UTC](https://community.haxe.org/t/map-api-library/3518 "2022-04-15T15:56:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![frankhdz](https://community.haxe.org/user_avatar/community.haxe.org/frankhdz/32/1873_2.png) [@frankhdz](https://community.haxe.org/u/frankhdz)\
**Post date:** [April 15, 2022, 3:56pm UTC](https://community.haxe.org/t/map-api-library/3518/1 "2022-04-15T15:56:11Z")

</div>

Is there are newer map api library available? Looking to create an application that can leverage either google maps or any map API really. The one I found is almost 8 years old and is not working for me.

---

<div class="post-metadata">

**Author:** ![haxiomic](https://community.haxe.org/user_avatar/community.haxe.org/haxiomic/32/75_2.png) [@haxiomic](https://community.haxe.org/u/haxiomic)\
**Post date:** [April 19, 2022, 2:31pm UTC](https://community.haxe.org/t/map-api-library/3518/2 "2022-04-19T14:31:12Z")

</div>

If you’re targeting the web, you can use dts2hx to get types for Google Maps and others. For example

```bash
npm i -D @types/google.maps
npm i dts2hx
npx dts2hx --all

```

This will generate .haxelib/google-maps, which looks good to me when I tested it.

You use the map library like you’d use any js/ts library. In this case, you need to add the js script to your page

```nohighlight
<script async
    src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap">
</script>

```
