zhangshaohu.files.wordpress.com …  · web viewkml is a file format used to display geographic...

10
How to display coordinates data information in google web-based maps By Shoahu Zhang 04/23/2014 I found this efficient solution to display coordinates when I explore Google Map API. Step 1 Open google web maps: https://maps.google.com/ Sign in Step 2 Quick on My places, then Create Map Quick on Create a new map

Upload: others

Post on 21-Sep-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: zhangshaohu.files.wordpress.com …  · Web viewKML is a file format used to display geographic data in an Earth browser such as Google Earth, Google Maps, and Google Maps for mobile

How to display coordinates data information in google web-based maps

By Shoahu Zhang 04/23/2014

I found this efficient solution to display coordinates when I explore Google Map API.

Step 1

Open google web maps: https://maps.google.com/

Sign in

Step 2

Quick on My places, then Create Map

Quick on Create a new map

Page 2: zhangshaohu.files.wordpress.com …  · Web viewKML is a file format used to display geographic data in an Earth browser such as Google Earth, Google Maps, and Google Maps for mobile

Step 3

Click on import

The imported file should be formatted CSV or xlsx. In this case, I use xlsx format data coming from the 2013 of SD crash data.

You can import 100 coordinates in free google web-based maps, but Maps Engine Pro is more powerful. Google Maps Engine Pro will cost $5 per month, or $50 per year.

Page 3: zhangshaohu.files.wordpress.com …  · Web viewKML is a file format used to display geographic data in an Earth browser such as Google Earth, Google Maps, and Google Maps for mobile

After click on import 100rows, you will continue to next step as follow:

Page 4: zhangshaohu.files.wordpress.com …  · Web viewKML is a file format used to display geographic data in an Earth browser such as Google Earth, Google Maps, and Google Maps for mobile
Page 5: zhangshaohu.files.wordpress.com …  · Web viewKML is a file format used to display geographic data in an Earth browser such as Google Earth, Google Maps, and Google Maps for mobile
Page 6: zhangshaohu.files.wordpress.com …  · Web viewKML is a file format used to display geographic data in an Earth browser such as Google Earth, Google Maps, and Google Maps for mobile

Export to kml file

You can export kml file in Maps engine, which can be drawled in google earth.

Click on file icon in the left corner of google map, choose Export to kml.

Drag or add the downloaded kml file into google earth.

Page 7: zhangshaohu.files.wordpress.com …  · Web viewKML is a file format used to display geographic data in an Earth browser such as Google Earth, Google Maps, and Google Maps for mobile

Introduction to KML (Keyhole Markup Language)

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 uses a tag-based structure with nested elements and attributes and is based on the XML standard.

Use Visual studio to open the kml file:

<?xml version='1.0' encoding='UTF-8'?><kml xmlns='http://www.opengis.net/kml/2.2'>

<Document><name>Accident2012.xlsx</name><Placemark>

<styleUrl>#icon-503-FF8277</styleUrl><name>Overturn/rollover</name><ExtendedData>

<Data name='string'><displayName>AccidentDateTime</displayName><value>1/1/12 9:12</value>

</Data></ExtendedData>

KML :

Internet-based,

two-dimensional maps

and three-dimensional Earth browsers

Google Maps supports the following KML elements:

PlacemarksIconsFoldersDescriptive HTML

o Entity replacement via <BalloonStyle> and <text>KMZ (compressed KML, including attached images)Polylines and polygonsStyles for polylines and polygons, including color, fill, and opacityNetwork links to import data dynamicallyGround overlays and screen overlays

Page 8: zhangshaohu.files.wordpress.com …  · Web viewKML is a file format used to display geographic data in an Earth browser such as Google Earth, Google Maps, and Google Maps for mobile

<ExtendedData><Data name='string'>

<displayName>CountyName</displayName><value>LAWRENCE</value>

</Data></ExtendedData><ExtendedData>

<Data name='string'><displayName>MOCDesc</displayName><value>No collision between 2 MV in

transport</value></Data>

</ExtendedData><ExtendedData>

<Data name='string'><displayName>HwyClassDesc</displayName><value>State Road</value>

</Data></ExtendedData><ExtendedData>

<Data name='string'><displayName>CrossDir</displayName><value>Northwest</value>

</Data></ExtendedData><ExtendedData>

<Data name='string'><displayName>LocDesc</displayName><value>On US HWY 14A at (MRM 028.00

+ .204)</value></Data>

</ExtendedData><ExtendedData>

<Data name='string'><displayName>LocSpeedLimitNbr</displayName><value>35.0</value>

</Data></ExtendedData><ExtendedData>

<Data name='string'><displayName>LatitudeValue</displayName><value>44.308953</value>

</Data></ExtendedData><ExtendedData>

<Data name='string'><displayName>LongitudeValue</displayName><value>-103.874677</value>

</Data></ExtendedData><description><![CDATA[AccidentDateTime: 1/1/12 9:12

CountyName: LAWRENCEMOCDesc: No collision between 2 MV in transportHwyClassDesc: State RoadCrossDir: NorthwestLocDesc: On US HWY 14A at (MRM 028.00 + .204)LocSpeedLimitNbr: 35LatitudeValue: 44.308953

Page 9: zhangshaohu.files.wordpress.com …  · Web viewKML is a file format used to display geographic data in an Earth browser such as Google Earth, Google Maps, and Google Maps for mobile

LongitudeValue: -103.874677]]></description><Point>

<coordinates>-103.874677,44.308953,0.0</coordinates></Point>

</Placemark>

Reference

1. https://developers.google.com/kml/documentation/kmlelementsinmaps

2. Keyhole Markup Language https://developers.google.com/kml/documentation/kml_tut?csw=1

3. Google Earth For Dummies http://www.doc88.com/p-906567148270.html