谷歌地图API中的地图类型概念 [英] the map type concepts in google maps api

查看:146
本文介绍了谷歌地图API中的地图类型概念的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

阅读谷歌地图javascript v3 api后,我发现我对地图类型和图层的一些概念感到困惑。

例如,google提供了一些内置的API,在地图类型中:


  • MapTypeId.ROADMAP显示默认路线图视图 MapTypeId.SATELLITE显示Google Earth卫星图像

  • MapTypeId.HYBRID显示普通和卫星视图的混合物

  • MapTypeId.TERRAIN显示基于地形$ b $的物理地图b信息。


    但是还有其他类型的流量层,有什么区别?



    看起来,其中一些只能显示一次,而其中一些可以一起显示(叠加)。



    任何人都可以告诉我更多细节吗?

    更新: p

    事实上,我正在一个想要构建我们自己的map api的项目中工作离线使用,我们需要为一种地图类型显示多个图层。



    <例如,我们有两个地图tpyes:矢量像谷歌的RoadMap和卫星。



    当我们显示vecotor类型时,有DEM / river / road这些图层应该被覆盖。



    我尝试引用google的想法,但我无法理解它。

    解决方案

    是的,从我所了解的概念中可以得知,这是正确的。如果你启动谷歌地图,你会看到这是如何实现的。



    地图类型是实际地图图片的样子。即无论是路线图还是卫星照片等。

    图层可以添加到这些图像之上,例如交通信息(而不是道路,但是道路工程,排队等)




    After read the google map javascript v3 api,I found I am confused about some concepts of the map type and layers.

    For example,google provide some built-in map types:

    • MapTypeId.ROADMAP displays the default road map view
    • MapTypeId.SATELLITE displays Google Earth satellite images
    • MapTypeId.HYBRID displays a mixture of normal and satellite views
    • MapTypeId.TERRAIN displays a physical map based on terrain information.

    But there are also other types like traffic layer,what's the difference?

    It seems that some of them can only displayed one once while some of them can displayed together(overlayed).

    Any one can tell me more details?

    UPDATE:

    In fact,I am working at a project which want to build our own map api for offline using,we need display more than one layers for one map type.

    For example,we have two map tpyes:vector like the google's RoadMap, and the SATELLITE.

    When we show the vecotor type,there are DEM/river/road layers which should be overlayed.

    I try to refer to google's idea,but I can not understand it.

    解决方案

    Yes, from what I can gather of your understanding of the concept, it is correct. If you fire up google maps, you'll see how this is implemented.

    Map types are what the actual map image looks like. I.e. whether it is a road map, or satellite photos, etc.

    Layers are stuff that can be added on top of those images, such as traffic info (not roads, but roadwork, queues, etc)

    这篇关于谷歌地图API中的地图类型概念的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆