A little over a year ago, I wrote an article for Adobe Edge on how to geocode with Papervision3D.
You can check that article out here.
Since then, however, Papervision3D has been making continual updates and the source code in my article no longer works.
This has been an issue for a while, as several people have noted in the comments on my post about the article.
I finally got around to updating it.
This new version works with the following library versions (both are the latest swcs at the time of this writing):
- Papervision3D 2.1.920
- Tweener 1.33.74
Here are the list of changes that needed to be made to work with the latest Papervision3D:
- The 15 degree longitude offset no longer needs to be there. Set the offset to 0.
- The default viewportHeight on GlobeView changed to match BasicView’s default of 480.
- The default cameraType value needed to change from “FREECAMERA3D” to “Free”.
- Added a default camera pitch of -30 to go along with the default yaw of 180.
- The camera reference is now cameraAsCamera3D.
- Changed the focus and zoom of the camera to match the new defaults of 10 and 40 respectively.
- The rotation values and min/max rotation values in onRenderTick needed to be adjusted.
- The camera needed to be adjusted further back in onRenderTick but not as far down.
- The mouse values needed to be adjusted in the onMouseDown.
Here are a list of new additions made to the project:
- GlobeView set to interactive to allow the markers to be selectable.
- Earth material did not need to be interactive.
- Added background to GlobeView to fix globe rotation issues introduced when interactive was set to true on the view.
- Added default markers.
- New method to add markers by latitude and longitude.
- Display of selected marker.
- Added clone and toString methods to event.
- To fix a small bug, the defaultButton in GeoGlobe.mxml has been moved to the topmost VBox instead of the internal HBox.
- The license has been changed to MIT.
- The domain digitalflipbook has been updated to yourpalmark.
- Updated the code to follow better standards.
- The html-template now uses swfobject.
I think that about covers all of the changes. I know many people have been asking for the markers to be interactive, so enjoy!
And without further ado, here’s the new source (make sure you grab the latest Papervision3D and Tweener libraries as well):