gpt4 book ai didi

google-maps - 我可以使用Google Maps API显示自定义 map 吗?

转载 作者:行者123 更新时间:2023-12-04 04:19:32 27 4
gpt4 key购买 nike

所谓自定义 map ,是指自定义 map 图块,例如,在绘制另一个星球时。我到处环顾四周,却找不到任何资源指出如何在Google或任何网站上执行此操作。

我知道这是有可能的,因为我以前在一个网站上看到过它,但是不幸的是,该网站的链接已关闭,因此我无法访问它。

最佳答案

看看API。这可以通过将自己的图像作为叠加层加载来帮助您:

Image Map Types

Implementing a MapType to act as a base map type can be a time-consuming and laborious >task. The API provides a special class that implements the MapType interface for the most >common map types: map types that consist of tiles made up of single image files.

This class, the ImageMapType class, is constructed using an ImageMapTypeOptions object specification defining the following required properties:

  • tileSize (required) specifies the size of the tile (of type google.maps.Size). >Sizes must be rectangular though they need not be square.
  • getTileUrl (required) specifies the function, usually provided as an inline >function literal, to handle selection of the proper image tile based on supplied world >coordinates and zoom level.

关于google-maps - 我可以使用Google Maps API显示自定义 map 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3079862/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com