Where in this sample could do i input my geo location that i want to display 3d model at? I want to beable to walk around a 3d car object.
// Sample experience to show 3D Model in Geo-AR var World = {
PATH_INDICATOR : "assets/directionIndicator.png", // use direction indicator from samples PATH_MODEL_WT3 : "assets/model.wt3", // use model from samples MSG_VISIBLE : "Here it is!", MSG_NOTVISIBLE : "There is a model nearby!", FEEDBACK_DIV = document.getElementById('loadingMessage'),
init: function initFn() {
// wait for first location signal before creating the experience to ensure you know user's location during setup process AR.context.onLocationChanged = function(latitude, longitude, altitude, accuracy){
// store user's location so you have access to it at any time World.myLocation = {"latitude": latitude, "longitude" : longitude, "altitude" : altitude };
// create model around the user on very first location update if (!World.created) { World.FEEDBACK_DIV.innerHTML = 'Loading...'; World.created = true; World.createModelAtLocation(World.myLocation); } };
},
createModelAtLocation: function createModelAtLocationFn(location) {
// place object around the user, in this case just a few meters next to the user. Note that the object will stay where it is, so user can move around it. World.modelGeoLocation = new AR.GeoLocation(location.latitude - 0.005, location.longitude + 0.0005, AR.CONST.UNKNOWN_ALTITUDE);
// load model from asset directory World.model = new AR.Model(World.PATH_MODEL_WT3, {
// trigger animation once asset was loaded onLoaded: function() {
// trigger loading of directin indicator World.indicatorImage = new AR.ImageResource(World.PATH_INDICATOR);
// create indicator drawable using the image resource World.indicatorDrawable = new AR.ImageDrawable(World.indicatorImage, 0.1, { verticalAnchor: AR.CONST.VERTICAL_ANCHOR.TOP });
Augustjason