I'm pretty new to Angular, and Im using kml file to locate lands and add few properies, im trying to create a button that focuses on a type of land according to the button name. The main idea is that the lands in the kml file would have an option to zoom in on the type of land i choose.
I got suggestion to use a json file, but not sure of how to using it properly.
<div>
<agm-map [latitude]="lat" [longitude]="lng" [fullscreenControl]='true' [mapTypeControl]='true'
[mapTypeId]="'hybrid'">
<agm-kml-layer url="my-google-drive-link-to-the-kml"></agm-kml-layer>
</agm-map>
<input type="text" id="myInput" onkeyup="myFunction()" placeholder="Search for names..">
<ul id="myUL">
<li><a href="#">Land A</a></li> <--- Button i click in order to focus on
this land
<li><a href="#">Land B</a></li>
<li><a href="#">Land C</a></li>
<li><a href="#">Land D</a></li>
</ul>
</div>
Thanks!
Theres some very nice article on how to do exactly this
This is parsing a KML layer,
you can tie each land to a layer as a button/Land A, B,If you want to parse a
localfile, here is ref. a working fiddle