Note that there are some explanatory texts on larger screens.

plurals
  1. POTrying to create a Group Selection Box in Google Earth Plugin
    primarykey
    data
    text
    <p>I am building a c# application that uses the Google Earth plugin through a web browser control. As part of the application, I need to be able to create a multi-select box around a certain area on the globe (think something similar to drag-selecting multiple files in your file browser).</p> <p>The way I have it set up right now, the c# code keeps track of when I am in select mode, if I am, the first left click pulls the lat-long of that point from the google earth plugin. After that, mouse moves get the lat-long of the opposite corner, and then the c# code calls the following 2 javascript functions:</p> <pre><code>function clearHighlightBox(){ var placemark = ge.getElementById('DARTselectBox'); if(placemark) { ge.getFeatures().removeChild(placemark); } } function setHighlightBox(lat1, long1, lat2, long2){ clearHighlightBox(); var placemark = ge.createPlacemark('DARTselectBox'); var lineString = ge.createLineString(''); var coords = lineString.getCoordinates(); coords.pushLatLngAlt(lat1, long1, 5000); coords.pushLatLngAlt(lat1, long2, 5000); coords.pushLatLngAlt(lat2, long2, 5000); coords.pushLatLngAlt(lat2, long1, 5000); coords.pushLatLngAlt(lat1, long1, 5000); placemark.setGeometry(lineString); ge.getFeatures().appendChild(placemark); } </code></pre> <p>First off, creating the ID for the placemark this way does not seem to work (ge.createPlacemark('DARTselectBox');). If I switch this to clear everything and remove the ID from the create Placemark call, this at least doesn't crash. However, even when I do that, I only see the right vertical leg of my rectangle.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload