En utilisant l'API Google Earth, j'ai créé des repères à des coordonnées spécifiques. Maintenant, je voudrais également placer une image aux mêmes coordonnées que les repères afin de montrer aux utilisateurs quelque chose de plus significatif que l'icône de marqueur par défaut. Est-ce qu'il y a un moyen de faire ça?Photos Google Earth Api
Répondre
Toute image peut être utilisé comme l'icône d'un repère. Pour ce faire, créez simplement un repère, puis définissez son style sur un style personnalisé qui pointe vers votre fichier image. De cette façon, l'image dont vous avez besoin sera aux mêmes coordonnées que le repère.
Quelque chose comme ce qui suit va, il vous faudra évidemment besoin de changer http://yourserver/yourimage.png
pour pointer vers l'image:
// Create the placemark.
var placemark = ge.createPlacemark('');
placemark.setName("placemark");
// Define a custom icon.
var icon = ge.createIcon('');
icon.setHref('http://yourserver/yourimage.png');
var style = ge.createStyle(''); //create a new style
style.getIconStyle().setIcon(icon); //apply the icon to the style
placemark.setStyleSelector(style); //apply the style to the placemark
// Set the placemark's location.
var point = ge.createPoint('');
point.setLatitude(12.345);
point.setLongitude(54.321);
placemark.setGeometry(point);
// Add the placemark to Earth.
ge.getFeatures().appendChild(placemark);
Pour plus d'informations, voir la section sur les documents Placemarks dans l'API. http://code.google.com/apis/earth/documentation/placemarks.html
Vous pouvez utiliser un KmlPhotoOverlay
référence api: http://code.google.com/apis/earth/documentation/reference/interface_kml_photo_overlay-members.html
exemple: http://earth-api-samples.googlecode.com/svn/trunk/examples/photo-overlay-viewer.html
- 1. API Google Map vs MS Earth Earth API
- 2. API Google Earth pour Android
- 3. Google Earth api javascript control
- 4. Photos Google+ api
- 5. Google Earth API - Superpositions de modèles 3D
- 6. entreprise google earth - javascript api URL
- 7. API Google Earth pour Flex/Flash
- 8. API Google Earth: Écouter les événements TourPlayer
- 9. tableau d'id avec Google Earth placemark api
- 10. Google Earth API C++ API Library Erreurs sur Ubuntu
- 11. Google Earth intégré à Google Maps API v3?
- 12. Google Earth KmlModel Altitude
- 13. API Android pour les photos Google+
- 14. Styling Google Earth Plugin bordures
- 15. comment ajouter un marqueur personnalisé dans google earth api?
- 16. API Google Earth, KML sur le serveur Web local
- 17. dessiner des routes avec google earth js api
- 18. recherche API Google Earth par indicateur d'emplacement Nom
- 19. API de cartographie: Google Earth, Worldwind ou OpenStreet MAP
- 20. js supprimer google earth repère
- 21. Créer Google Earth zoomer
- 22. éditer google earth polygon
- 23. Google Earth portant foiré
- 24. C# Google Earth Erreur
- 25. interactif google earth building
- 26. erreur google earth tour
- 27. Google maps et l'application Google Earth
- 28. Commandes personnalisées dans Google Earth Plugin
- 29. Vidéo contextuelle Google Earth (ActiveX)
- 30. Virtual Earth ou Google Maps