Как отобразить движущуюся лодку в Google Earth?

Не делайте твердого кода Ваши URL!

Использование имена URL вместо этого, и reverse функция для получения самого URL.

при определении отображений URL дайте имена URL.

urlpatterns += ('project.application.views'
   url( r'^something/ 

Удостоверяются, что имя уникально на URL.

у меня обычно есть последовательный формат "project-appplication-view", например, "cbx-forum-thread" для представления потока.

ОБНОВЛЕНИЕ (бесстыдно кража дополнение ayaz ):

Это имя может использоваться в шаблонах с url тег .

, 'view_function', name="url-name" ), .... )

Удостоверяются, что имя уникально на URL.

у меня обычно есть последовательный формат "project-appplication-view", например, "cbx-forum-thread" для представления потока.

ОБНОВЛЕНИЕ (бесстыдно кража дополнение ayaz ):

Это имя может использоваться в шаблонах с url тег .

21
задан Thomas Owens 5 November 2009 в 13:06
поделиться

5 ответов

Если вы собираетесь отображать лодку в Google Планета Земля, трехмерная модель будет лучшим подходом, чем изображение, поскольку пользователи могут изменять угол обзора.

0
ответ дан 29 November 2019 в 21:52
поделиться
-2
ответ дан 29 November 2019 в 21:52
поделиться

The only way I've been able to make this work in static KML is to interpolate between the start and stop points and add placemarks for each frame I want to animate. So, from t=0 to t=1, draw a placemark at the start point. From t=1 to t=2, draw a placemark at the next point, etc.

This gives you the temporal player bar in Google Earth and you can rewind or advance the animation. However it is a little annoying because you wind up with every interpolation point in your placemark tree. Putting the placemarks in their own folder keeps them out of the way, but there's no way to hide them from the user.

Take a look at http://code.google.com/apis/kml/documentation/time.html#animating The whale shark example does more or less what you want for the placemark. (The URL for the marker icon is broken). Animating the progress along the track can be done using the same trick.

If you want to try something much more difficult, you can try serving dynamic KML. Have Google Earth load a network link to your initial data. Then load another network link with an that sends an update for your placemark at every time tick.

This approach has some serious disadvantages because it requires an external program to drive Google Earth and it does not give the user access to the built-in Google Earth temporal player bar. It also requires that all the data be loaded over a network link -- KML data from a file cannot be updated. That means your driver program needs to act as a http server. Also, in this model it is very hard to know exactly when Google Earth has finished loading and drawing the update. Really I don't recommend doing this; you can make it work using the Google Earth COM API, but it will always be a fragile solution.

11
ответ дан 29 November 2019 в 21:52
поделиться

There's a browser plug-in that lets you embed Google Earth into a browser page. From there you can use JavaScript to animate your placemark, change your paths, etc. Check out the Google Earth API Developer's Guide.

3
ответ дан 29 November 2019 в 21:52
поделиться

Возможно, вы захотите изучить туры: http://code.google.com/apis/kml/documentation/touring.html

Я видел что-то подобное выполняется с помощью комбинации (нескольких) тегов для перемещения ранее созданной метки, представляющей вашу лодку, и тегов для перемещения обзора (I think) все в .

Надеюсь, это поможет.

0
ответ дан 29 November 2019 в 21:52
поделиться
Другие вопросы по тегам:

Похожие вопросы: