Google Maps Engine Cookbook - googleusercontent.com

3 downloads 159 Views 4MB Size Report
Sep 3, 2014 - long as the code adheres to the limits specified in HTML ... the three anchor points to align ... A KML te
Google Maps Engine Cookbook Simple recipes for common map types

Google Maps Engine Cookbook

Copyright © 2014, Google, Inc. 9/3/14

Google Maps Engine Cookbook

Cookbook contents

Before you begin: Quick tour of the app The ABCs of building a map Recipes 1. Map with point encoding="UTF-8"?> 1 statehoodLegend.png

Google Maps Engine Cookbook

KML is a file format used to display geographic data in an Earth browser, such as Google Earth, Google Maps, and Google Maps for mobile. KML is an international standard maintained by the Open Geospatial Consortium, Inc. (OGC). The sample KML file at the left adds a KML screen overlay to the upper-right corner of the screen. You can modify the X and Y values in the file to position the image at a different location on the screen. (0,0) is the lower-left and (1,1) is the upper-right corner of the screen.

Page 37

Recipe 4 | Adding a legend: Upload the data cont.

Upload the KMZ archive 1. 2. 3. 4.

Click the red up arrow and browse to the KMZ archive you created in the previous step. Select the radio button that says to upload the file as a KML file. Fill in the other fields, such as the Description and search Tags. Press Upload and wait for the data to process.

Google Maps Engine Cookbook

Page 38

Recipe 4 | Adding a legend: Prepare the layer cont.

Add the data to a new layer 1. 2. 3.

Click Add to layer and the Create new layer dialog appears. Fill in a name for the layer. The KML type is preselected for you. Click Create.

Process the layer 1. 2. 3. 4.

After the layer has been created, click View details. Click Process now. When the layer finishes processing click Publish layer. Share it with the appropriate groups and individuals.

Google Maps Engine Cookbook

Page 39

Recipe 4 | Adding a legend: Add layer to map cont.

Add the layer to a map 1.

Click Add to map.

2.

Select the Statehood map you created in Recipe 2 (or the map described by your legend).

3.

Click Add to map, which adds the KML layer to the existing map.

Google Maps Engine Cookbook

Page 40

Recipe 4 | Adding a legend: Serve cont.

View, publish, and share the map 1. 2. 3.

Click Publish new map (upper-right corner). Preview the map and share it with the appropriate groups and individuals. Select View published map from the drop-down menu and check that the legend and other data display properly.

The Google Maps Gallery Participant Program Policies include the following guidelines for legends: Maps may include one KML screen overlay that contains the map legend. The overlay should be on the righthand side of the map. We recommend that overlays do not exceed 300 x 500 px or 500 x 300 px. The screen overlay may contain an optional logo, but the logo may not exceed 150 x 150 px. The KML screen overlay may not be used for promotional or advertising purposes. The legend should not be added as part of the map description since the description cannot contain images.

Google Maps Engine Cookbook

Page 41

Glossary | A–L

anchor point In Maps Engine, the anchor points are red markers that you position on the image so that you can align it with known reference points on the base map. (recipe 3) attribute A piece of data that applies to a feature. An attribute has a name (for example, Population) and a type (for example, Number). (recipe 2) base map The built-in map that supplies the “canvas” for your data, layers, and maps. (recipe 2 and recipe 3) choropleth map A map that uses a color scale to reflect gradations in statistical data. If you’re interested in learning more about cartography and design, check out some samples on the web, then see if you can apply some of them to your data. (recipe 2) CSV    Stands for comma-separated values. This is a method of presenting vector data, where each column in the table is delimited by a comma.

feature A vector object (point, line, polygon) or a combination of vector objects (multipoint, multiline, multipolygon). (recipe 2) filter A logical statement that describes a subset of your data (for example, name=Smith or population>9000. The string values are typically attributes (column headings) in your data set. (recipe 1) georeference To include data in an image about its geographical location. (recipe 3) icon A very small image used as the placemark for a point. (recipe 1) layer In Maps Engine, a layer is a collection of data that is added to a map. (all recipes) legend An inset in a map that explains the colors and symbols used in the map. (recipe 4)

display rule Specifies style attributes such as color, line pattern, and label names. To apply a particular style to a subset of your data, create a filter. (recipe 1, recipe 2)

Google Maps Engine Cookbook

Page 42

Glossary | M–Z

raster image An image that is composed of a grid of pixels. Also called a bitmap. A raster image can be imported into Google Maps Engine, but it can’t be styled. (recipe 3) style The set of colors, line patterns, icons, and labels applied to your data or a subset of your data. Custom styles are specified in display rules. (recipe 1, recipe 2)

vector A point, line, or polygon (also collections: multi-points, multi-lines, and multi-polygons) (recipe 1, recipe 2) vector table The format Maps Engine uses to store vector data after it’s uploaded. It’s like a spreadsheet, with rows, columns, and headings. See article on vector tables (recipe 1, recipe 2)

shapefile A standard vector data file format, originally developed by Esri. File extension is .shp. Shapefiles are accompanied by additional files containing metadata about the information in the shapefile. Shapefiles must be accompanied by .shx files (describe the indexes in the shapefile) and .dbf files (describe attributes of the data). (recipe 2) sidecar files The set of files that accompany the shapefile. For shapefiles, .shx and .dbf files must be provided. Your data may also have additional optional sidecar files with related data. (recipe 2)

Google Maps Engine Cookbook

Page 43

Suggest Documents