Google Cloud | Google Maps Supporting Kotlin

Google Maps Platform JavaScript API And TypeScript

In July, we started rolling out TypeScript samples in the Maps JavaScript API documentation to better support modern web developers. According to a 2019 JavaScript developer survey, nearly 60% have used TypeScript and will use it again, while over 20% are interested in learning it. TypeScript is growing in popularity and we hope to make the experience the best it can be for Google Maps Platform developers. We think it’s important to support TypeScript not only because it’s popular, but because it allows developers to validate that their code is correct and provide better experiences with Google Maps Platform. 

You can find the new sample code by clicking the TypeScript tab on any snippet. For example, here’s our Simple Map sample for JavaScript:

Google Cloud | Google Maps Javascript
Code snippets with JavaScript tab

And here it is with added TypeScript support:

Google Cloud | Google Maps Typescript
Code snippets now have a TypeScript tab

To help you get started, we also published a TypeScript and Google Maps Platform guide that covers many of the basics including possible compiler options and installation instructions for typings. We want to call out that this wouldn’t have been possible without the work of the open source TypeScript community and the type definitions they maintain and publish on Definitely Typed. These types can be installed via NPM by running the following:

  npm i -D @types/googlemaps

Node.js developers using Google Maps Platform APIs from server environments should not feel left out–a TypeScript rewrite of the client library was published earlier this year.

For more information on Google Maps Platform, visit our website.

By Justin Poehnelt. Source: Google Cloud Blog.

For enquiries, product placements, sponsorships, and collaborations, connect with us at We'd love to hear from you!

Our humans need coffee too! Your support is highly appreciated, thank you!

Previous Article
Computer | Laptop | Chart

Image Archive, Analysis, And Report Generation With Google APIs

Next Article
Google Cloud | Bluecore

Online Shopping Gets A Boost From Cloud SQL

Related Posts
Read More

Why I Love Go

I’ve been building software over the last four decades, as a developer, manager and executive in both small…