World.markerDrawable_idle = new AR.ImageResource("assets/marker_idle.png"); World.markerDrawable_selected = new AR.ImageResource("assets/marker_selected.png"); World.markerDrawable_directionIndicator = new AR.ImageResource("assets/indi.png");
updateDistanceToUserValues: function updateDistanceToUserValuesFn() { for (var i = 0; i < World.markerList.length; i++) { World.markerList.distanceToUser = World.markerList.markerObject.locations.distanceToUser(); } },
updateStatusMessage: function updateStatusMessageFn(message, isWarning) {
var themeToUse = isWarning ? "e" : "c"; var iconToUse = isWarning ? "alert" : "info";
onPoiDetailMoreButtonClicked: function onPoiDetailMoreButtonClickedFn() { var currentMarker = World.currentMarker; var architectSdkUrl = "architectsdk://markerselected?id=" + encodeURIComponent(currentMarker.poiData.id) + "&title=" + encodeURIComponent(currentMarker.poiData.title) + "&description=" + encodeURIComponent(currentMarker.poiData.description);
document.location = architectSdkUrl; },
// location updates, fired every time you call architectView.setLocation() in native environment locationChanged: function locationChangedFn(lat, lon, alt, acc) {
getNumberOfVisiblePlacesInRange: function getNumberOfVisiblePlacesInRangeFn(maxRangeMeters) { World.markerList.sort(World.sortByDistanceSorting); for (var i = 0; i < World.markerList.length; i++) { if (World.markerList.distanceToUser > maxRangeMeters) { return i; } };
return World.markerList.length; },
handlePanelMovements: function handlePanelMovementsFn() {
Hi eka, I assume you already had a look at our example which injects poi data from a local json resource? With your local json data in place, call loadPoisFromJsonData and if the json is in the right format, your pois should show up.
You can debug your Architect World using Google Chrome (Android) and Apple Safari (iOS). This might also help you to develop your Architect World/find issues.
Best regards,
Andreas
E
Eka.samod
said
almost 7 years ago
Thanks Andreas Schacherbauer for answering ..
Did you mean this code?
requestDataFromLocal: function requestDataFromLocalFn(lat, lon) {
var poisNearby = Helper.bringPlacesToUser(myJsonData, lat, lon); World.loadPoisFromJsonData(poisNearby);
/* For demo purpose they are relocated randomly around the user using a 'Helper'-function. Comment out previous 2 lines and use the following line > instead < to use static values 1:1. */
// World.loadPoisFromJsonData(myJsonData); }
var Helper = {
/* For demo purpose only, this method takes poi data and a center point (latitude, longitude) to relocate the given places randomly around the user */ bringPlacesToUser: function bringPlacesToUserFn(poiData, latitude, longitude) { for (var i = 0; i < poiData.length; i++) { poiData.latitude = latitude + (Math.random() / 5 - 0.1); poiData.longitude = longitude + (Math.random() / 5 - 0.1); /* Note: setting altitude to '0' will cause places being shown below / above user, depending on the user 's GPS signal altitude. Using this contant will ignore any altitude information and always show the places on user-level altitude */ poiData.altitude = AR.CONST.UNKNOWN_ALTITUDE; } return poiData; } }
A
Andreas Schacherbauer
said
almost 7 years ago
Yes. In generell the example 'Obtain Poi Data - From Application Model' is your preffered reference point.
Best regards,
Andreas
E
Eka.samod
said
almost 7 years ago
But why when I'm build that's sdk samples in POI Capture Screen .. my POI in camera didn't show up with error "trying to find out where you are"... help me please :D :{
A
Andreas Schacherbauer
said
almost 7 years ago
Hi eka, Did you enable GPS access? 'Trying to find out where you are" is the message we display in case no GPS signal is received.
Eka.samod