is google maps api V3 requires key?

我的梦境 提交于 2019-12-23 19:13:40

问题


I developed one website in google maps api V2, now management is saying V2 is deprecated and convert in to V3. While googling the V3 i didn't see any api key? then how it works?

http://maps.googleapis.com/maps/api/js?sensor=false

src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=ABQIAAAAZIdFD1WVdDZkZtynpOarChQNeNa5CKtG0-vmTH0qjucdvCYnQxSdAQEaIYCVLr1JYZPtbiF0LjTojQ"

and how to convert from V2 to V3? should i develop it from scratch onwards?


回答1:


Google maps api v3 doesn't need a key like v2. You are encouraged to use v3 because of the support for devices like iphone and android.

Googe maps api v3 has been implemented using modified MVC framework. .

Any state changes of an MVC object (such as a map) for example, are handled through setters and getters of a particular format. As well, all state of the MVC objects are stored as properties of that object, and all observation of state changes through event handlers is of a particular format as well.

Learn More




回答2:


Google Maps API v3 can be used both with and without a key. You can read this post for clues how to migrate your application. Basically

The second step in the migration process consists in renaming api calls and objects. The renaming follows the following pattern:

GMarker -> google.maps.Marker

GOverlay ->google.maps.Overlay

GEvent -> google.maps.Event …



来源:https://stackoverflow.com/questions/8624656/is-google-maps-api-v3-requires-key

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!