Google Maps

Web Map Layers 8.0 allows you to add the following Google layers as base mapping:

Editing the map.aspx

First, if you wish to add Google base mapping to your map you must uncomment the Google maps tag from the map.aspx file (located in your installed webMapLayers8 folder). Also if you wish to view your map on a mobile device you will also need to edit the map.aspx located in WebMapLayers8\Mobile folder. The code you need to uncomment is as follows:

<%-- <script type="text/javascript"
src="http://maps.google.com/maps/api/js?
v=3.5&sensor=false"></script>--%>

Note: Make sure the version (v=) is 3.5, as above, change this if necessary.

Adding the data

Field Is it Optional
or Required?
Description
Name Required An appropriate user added name.
Is Base Layer Required This should always be ticked. It defines the layer as a base layer.
Include in Layer Tree Optional This parameter is only applicable if you intend on accessing the mobile site. Unlike the desktop site, the mobile site does not have a base layer drop down in the top right corner, ticking this option will therefore add the base layer to the Map Features dialog in the What would you like to do? menu, this will allow you to switch between base maps.
If this option is ticked, the layer will not appear in the Map Features dialog of the desktop site.
Spherical Mercator Required This defines if the map should act as a mercator-projected map (Mercator projection treats the earth as a sphere as opposed to a projection which treats the earth as an ellipsoid). This will cause all interactions with the map to be in the actual map projection, which allows support for vector drawing, overlaying other maps, etc. This is turned on as default.
Layer Type Required Allows you to choose between the four supported google base layers outlined above.

Adding Google Maps to a new blank map

If Google maps is being used as base mapping on a newly created blank map, then no resolutions will be displayed in the admin page, this is because the google resolutions are hard coded into open layers.

New maps are created in British National Grid projection (EPSG 27700) by default, so after adding the Google base mapping, you will need to change the projection and display in the general settings to EPSG 3857.

If you are having difficulties loading your map, ensure that there are no spaces in the map name, as this will create complications in the styles_MapStyle of the webMapLayersConfig.db.


Send comments on this topic.