posted on Tuesday, February 5th, 2013
Option 1: Embed KML file created in Google Map to website
- Go to Google Maps, login using your Google account then click button “My Places”.
- Create your personalized map by clicking “Create Map” button. For this example, I named my Map as “Sample Interactive Map”, where I added polygon, line and points as seen below, where the line represents Lake Fort Peck’s centroid, blue polygon covering the area of the lake and points representing bays (blue wave symbol) and park (green pine tree symbol).
View Larger Map
- These lines, points and polygons can be customized to fit your preference and how you would like your final layer to look like (e.g. you can upload your own point symbol, change the color of your line or color and opacity of your polygon). You can likewise add descriptions to these items, adding links, information and even media (videos, images, etc.) to them.
- When you are finished with your map, click save and done button. To download your kml file, click “KML” link displayed on your Google Map dashboard.
- Embedding your KML file to your website is just a few steps away. Upload your KML file to your website (e.g. https://www.jamediasolutions.com/kml/SampleInteractiveMap.kml, I uploaded this example map to my KML folder), then go to Google Maps and paste your KML url to Google Map search textbox.
- Finally click “Link to these page” icon and an embed code will be displayed. Copy this code and paste to your website post just like I did above.
Option 2: Embed KML files extracted from ESRI shapefiles
- For purpose of example, I extracted a parts of my shapefiles and prepared my map layers to be converted to KML.
- In my example I extracted a few street layer (line shapefile) and structure centroids (point shapefile) from Mandaue City.
- Using ESRI’s ArcGIS ArcToolbox, we can use the ‘Conversion’ tool for either Shape to KML or Map to KML.
- Alternatively, we can also use other applications that offers conversion tools (e.g. Global Mapper).
- Upload your KML file to your website (e.g. https://www.jamediasolutions.com/kml/sample3.kmz), then go to Google Maps and paste your KML url to Google Map search textbox.