![]() ![]() The LatLngBounds represents a rectangle built by specifying the south-west and north-east points. The first is fitBounds(), which takes a LatLngBounds object as its only parameter. zoom: a positive number that sets the initial zoom of the map.Īpart from the several setters and getters for the class attributes, there are a couple of methods worth mentioning.For instance, you can see the map as a road map or a satellite map. mapTypeId: a object, which is used to set the type of the map.center: a object (more on this later) used to set the initial map center.The MapOptions objects have many properties, but only the following three are required. The Map class accepts two parameters that are an HTML element, that will contain the map, and a object. The most important and used class of the library is. There are many other objects and methods available, but discussing every aspect of the API is beyond the scope of this article. This section covers the main classes and methods of the Google Maps API. This article also assumes a basic understanding of Geolocation, which you can get by reading Using the HTML5 Geolocation API. Keep in mind that the Google Maps API has usage limits that you can increase for a fee. The API key allows you to monitor your application’s usage, and gives Google the chance to get in touch with you if necessary. If you need information about how to obtain the key, you can read the getting started guide. The service is completely free, but you should subscribe to the APIs Console website to obtain your API key, and use it when you send a request to the service. The examples in this article use version 3.10 of the API. The Google Maps API lets you integrate the Google Maps service with your website. This article will show you how to use the Geolocation API together with the Google Maps API. This has the potential to dramatically enhance your user experience. Geolocation allows an application to determine your physical coordinates, and tailor the application to you. One of today’s most used APIs is the Geolocation API.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |