user2189424
user2189424

Reputation: 41

Google Earth Api: Add markers to Google Earth(street view layer)

I'm currently work on a project on Google Earth(Using Google Earth plugin).

I'm trying to add a placemark in Google Earth and see this mark in

Google Earth(street view layer).But I can only see the placemark

in ground layer. The mark just disappear when I enter street view layer.

The following is my code

                var placemark = DS_ge.createPlacemark('');
                placemark.setName("placemark");
                var icon2 = DS_ge.createIcon('');
                icon2.setHref('http://localhost/Earth/man.jpg');
                var style = DS_ge.createStyle(''); //create a new style
                style.getIconStyle().setIcon(icon2); //apply the icon to the style
                placemark.setStyleSelector(style); //apply the style to the placemark
                var point_test = DS_ge.createPoint('');
                point_test.setLatitude(myRoute.steps[0].path[0].lat());
                point_test.setLongitude(myRoute.steps[0].path[0].lng());
                placemark.setGeometry(point_test);
                DS_ge.getFeatures().appendChild(placemark);

Is there a way to achieve the result that I can see the place mark in street view layer.

Any suggestion will be helpful :)

Upvotes: 1

Views: 746

Answers (1)

Fraser
Fraser

Reputation: 17039

AFAIK no - this used to work without issue and I believe it is a bug. You are adding the placemarks correctly, but unfortunately Placemarks in streetview mode appear to be broken in the current version of the plug-in.

I would suggest you report the issue here http://code.google.com/p/earth-api-samples/issues/entry?template=Bug

For what it is worth, the full desktop application has the same problem for me as well - and it doesn't even work on the web google maps - https://www.google.co.uk/maps/preview - so at a guess there is something really amiss with the "streetview" mode in general.

Upvotes: 0

Related Questions