
#Making a map layer in pcswmm and zooming in code
Var transitLayer = new () Įxcept as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. Var map = new (document.getElementById("map"), mapOptions) The below snippet centers the map on London, UK, and adds the TransitĬenter: new (51.5,-0.11) Passing it the map object on which to display the layer. To add a layer to a map, you only need to call setMap(),

This layer is returnedīy default within the DirectionsRenderer when requesting

Note that most layers, by design, may not beĪccessed via their individual objects, but may only be manipulated as a

Layer of the map itself, slightly altering the base tiles in a fashionĬonsistent with the layer. Maps JavaScript API manages the presentation of objects within layersīy rendering their constituent items into one object (typically a tile overlay) andĭisplaying them as the map's viewport changes. Objects that you add on top of the map to designate a common association. Layers are objects on the map that consist of one or more separate items,īut are manipulated as a single unit.
