Can I use the Google Maps API to display a custom map?

后端 未结 1 773
醉话见心
醉话见心 2020-12-31 16:59

And by custom map I mean custom map tiles, as in, mapping another planet. I\'ve looked all around but can\'t see to find any resources pointing how to do this on Google\'s o

相关标签:
1条回答
  • 2020-12-31 17:35

    Have a look at the API. This might help you by loading own images as an overlay:

    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.
    0 讨论(0)
提交回复
热议问题