Čaute, hraju si s novým Earth API a nedaří se mi zobrazit značku. Na
code.google.com sem našel příklad, ale nedaří se mi ho rozjed:
google.load("earth", "1");
var ge = null;
function init() {
google.earth.createInstance("map3d", initCallback,
failureCallback);
setpoint();
}
function initCallback(object) {
ge = object;
ge.getWindow().setVisibility(true);
}
function failureCallback(object) {
}
function setpoint() {
var placemark = ge.createPlacemark('');
placemark.setName("My point");
ge.getFeatures().appendChild(placemark);
var normal = ge.createIcon('');
normal.setHref('
http://maps.google.com/mapfiles/kml/paddle/red-
circle.png');
var iconNormal = ge.createStyle('');
iconNormal.getIconStyle().setIcon(normal);
var highlight = ge.createIcon('');
highlight.setHref('
http://maps.google.com/mapfiles/kml/paddle/
red-circle.png');
var iconHighlight = ge.createStyle('');
iconHighlight.getIconStyle().setIcon(highlight);
var styleMap = ge.createStyleMap('');
styleMap.setNormalStyle(iconNormal);
styleMap.setHighlightStyle(iconHighlight);
placemark.setStyleSelector(styleMap);
var la =
ge.getView().copyAsLookAt(ge.ALTITUDE_RELATIVE_TO_GROUND);
var point = ge.createPoint('');
point.setLatitude(la.getLatitude());
point.setLongitude(la.getLongitude());
placemark.setGeometry(point);
}
Beru každou pomoc, dík