Google Earth com api Based C # how to add landmarks/paths

Source: Internet
Author: User

The idea is as follows:

1) The ge com api does not provide an interface for adding objects directly. Therefore, we can only load objects using the kml file openkmlfile/loadkmldata method;

2) The loaded objects are stored in the temporary position (temporaryplaces) without a special declaration, therefore, we want to delete the previously painted features by modifying kml to load the same object;

The procedure is as follows:

(1) Parse kml in the form of parsing XML (you must be familiar with the kml label first) and implement it using the xmldocument or LINQ to XML-related component interfaces, you can return the file path name or direct XML memory file (for openkmlfile/loadkmldata );

(2) After kml is added, use the featurege interface to obtain the elements (applicationgeclass. gettemporaryplaces (). Here, you can only use visibility to hide the elements. Of course, you can also directly set them in kml.

(3) Empty mode. Design a variable. Here we should follow the XML syntax. Use this empty variable to replace the kml added to the GE Interface and load the variable to the GE Interface, implement the so-called "clear" function.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.