layout: post
title: Using Google Maps Javascript to Import KML Files and Automatically Draw Maps
date: 2021-08-24 17:41 +8
description: How to use KmlLayer to present data without manually reading it, and potential issues you may encounter.
toc: false
share: true
comments: true
tags: GoogleMaps Javascript Development
Code
Potential Issues
Line thickness differs from what you see on Google My Maps or Google Earth! Why is it so thick?
You need to manually add <width>0.001</width>
for each <LineStyle></LineStyle>
in the KML file.
0.001 can be changed to your desired value.
Tip: Find and replace </LineStyle>
with <width>0.001</width></LineStyle>
Facebook 留言