Kazu46Machi / earth-api-samples

Automatically exported from code.google.com/p/earth-api-samples
0 stars 0 forks source link

Allow setXUnits and setYUnits on getClientX calls in a KMLMouseEvent. #210

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What should this feature enhancement do?

Allow setXUnits and setYUnits on getClientX calls on a KML Mouse event.

I can also place screen overlays using UNITS_FRACTION or UNITS_INSET_PIXELS
Now I want to know where I clicked on the screen in relation to this screen
overlay.

For a screenoverlay I code:
screenOverlay.getScreenXY().setXUnits(ge.UNITS_FRACTION);

I would like to be able to code:

function doMouseClick(event){
  event.getClientX().setXUnits(ge.UNITS_FRACTION);
  alert(event.getClientX());
}

and get a number between 0 and 1 back.

Are there any known workarounds that produce the similar results?

None that I am aware of. Fraction and inset_pixels are very easy to place
overlays but they need a wider support in the API to make them useful.

Original issue reported on code.google.com by vandint...@gmail.com on 4 Apr 2009 at 9:43