Skip to content
Products
Product category pricing to meet your needs
Essentials
10K free* calls per SKU per month
Integrate the best of Google Maps into your applications.
Pro
5K free* calls per SKU per month
Build more dynamic and differentiated experiences.
Enterprise
1K free* calls per SKU per month
Transform your business with maximum flexibility and control.
Products
Discover the APIs and SDKs available to create the best maps for your business.
Product category pricing to meet your needs
Essentials
10K free* calls per SKU per month
Integrate the best of Google Maps into your applications.
Pro
5K free* calls per SKU per month
Build more dynamic and differentiated experiences.
Enterprise
1K free* calls per SKU per month
Transform your business with maximum flexibility and control.
Solutions
By industry
By use case
Resources
Products
Product category pricing to meet your needs
Essentials
10K free* calls per SKU per month
Integrate the best of Google Maps into your applications.
Pro
5K free* calls per SKU per month
Build more dynamic and differentiated experiences.
Enterprise
1K free* calls per SKU per month
Transform your business with maximum flexibility and control.
Products
Discover the APIs and SDKs available to create the best maps for your business.
Product category pricing to meet your needs
Essentials
10K free* calls per SKU per month
Integrate the best of Google Maps into your applications.
Pro
5K free* calls per SKU per month
Build more dynamic and differentiated experiences.
Enterprise
1K free* calls per SKU per month
Transform your business with maximum flexibility and control.
Solutions
By industry
By use case
Resources
Products
Product category pricing to meet your needs
Essentials
10K free* calls per SKU per month
Integrate the best of Google Maps into your applications.
Pro
5K free* calls per SKU per month
Build more dynamic and differentiated experiences.
Enterprise
1K free* calls per SKU per month
Transform your business with maximum flexibility and control.
Products
Discover the APIs and SDKs available to create the best maps for your business.
Product category pricing to meet your needs
Essentials
10K free* calls per SKU per month
Integrate the best of Google Maps into your applications.
Pro
5K free* calls per SKU per month
Build more dynamic and differentiated experiences.
Enterprise
1K free* calls per SKU per month
Transform your business with maximum flexibility and control.
Solutions
By industry
By use case
Resources

Google Maps Platform JavaScript API and TypeScript

Justin Poehnelt
Developer Relations Engineer
Dec 3, 2020
Try Google Maps Platform
Get up to 10,000 free* calls per SKU per month and build more with Google Maps Platform.
Learn more

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:

JavaScript Snippet

Code snippets with JavaScript tab

And here it is with added TypeScript support:

TypeScript Snippet

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
Copied to clipboard!

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.

Clay cityscape
Clay cityscape
Get going with Google Maps Platform
  • *Free usage refers to monthly calls available at no cost. Essentials Map Tiles APIs provide up to 100,000 calls at no cost per SKU per month.