Google API 및 Sketchup을 사용하여 대화식지도를 개발 중입니다. 내가 만든 다음 코드를 사용하여 3D 오브젝트를 배치 한이 샘플을 웹 사이트에서Placemark 기능이있는 3D 모델
var loc = ge.createLocation('');
loc.setLatitude(lookAt.getLatitude());
loc.setLongitude(lookAt.getLongitude());
model.setLocation(loc);
// set up the model's link (must be a COLLADA file).
// this model was created in SketchUp
var link = ge.createLink('');
model.setLink(link);
link.setHref('http://earth-api-samples.googlecode.com/svn/trunk/' +
'examples/static/splotchy_box.dae');
// create the model placemark and add it to Earth
var modelPlacemark = ge.createPlacemark('');
modelPlacemark.setGeometry(model);
ge.getFeatures().appendChild(modelPlacemark);
// zoom in on the model
lookAt.setRange(300);
lookAt.setTilt(80);
ge.getView().setAbstractView(lookAt);
// persist the placemark for other interactive samples
window.placemark = modelPlacemark;
: http://earth-api-samples.googlecode.com/svn/trunk/demos/interactive/index.html
나는 3D 모델로 일반 위치 표시의 옵션을 추가하려고를 (그래서 크기가 변경 마우스가 움직일 때 &는 클릭 가능).
저는 Google API에 비교적 익숙하지 않으므로 다음과 같은 궁금한 점이 있습니다. 어떻게 이러한 기능을 3D 개체에 추가 할 수 있습니까?
(동일한 웹 사이트에서) 일반 장소 표시를 만드는 방법을 알고 있지만 3D 모델을 장소 표시로 지정하는 방법을 모르겠습니다.
감사합니다.
건물 (3D 객체)가 나타납니다에서 동적으로 주어진 좌표에 따라 장소를 이동하는 방법을 알고,하지만 아무것도하지 않습니다 ... 내가 성취하고자하는 것은 그것이 클릭 가능한 객체이고 HTML 풍선과 같은 무언가가 그것을 클릭 할 때 맨 위에 표시된다는 것입니다. –
지연된 답장을 드려 죄송합니다. 위의 보이지 않는 위치 표시기를 추가하면 코드가 필요할 경우 할 수 있습니다. – Sid
안녕하세요, 지연된 응답을 보내 주셔서 감사 드리며 지연에 대해 사과드립니다. 코드를 알려 주시면 감사하겠습니다. –