Start a new topic

Multiple POIs with screen capture

Multiple POIs with screen capture


To whom it may concern:

I'm working on the sample from the examples package that allows you to screen capture. The app retrieves poi data from server and for some reason once I add more than 1 poi, the app renders an additional poi in my current location. Say I add two pois to my json file, both within range of my current location. The app will render both of those pois, correctly, and add an additional poi in my location (1m away). Any help with this would be greatly appreciated. Thanks.

Hello Martin,

As it turns out, the issue is not that the sdk adds an additional poi but that one of those pois being loaded from the server has an incorrect location. The poi's coordinates are being replaced with the user's, making the poi appear 1m away. What's strange though is that when I ran the model with 2 pois it worked fine, but after I added another 8 for a total of 10 I started to have this issue.

Regards,

Marcelo

Hello Martin,

Yes, I solved that issue as well. I now have one final question which concerns the communication between the server and the app. I would like any changes I make to my POI data (description included) in the server to be passed to the app. I checked online and found out about Google's C2DM framework to push message updates to the app when required; however, does the current SDK offer something similar to this? The issue here is that once the app is released I'll need to make adjustments to the POI data based on user interaction, which I'll need to pass somehow.

Thanks in advance.

Marcelo

Hi Marcelo,

I see several ways to achieve this.

You could use a service like Google Cloud Messaging (GCM, it's the next gen version of C2DM, which has officially been deprecated a while ago), receive the messages in your app and pass it on to the SDK using the callJavaScript() the SDK provides. You just need to pass the new data with this call, and you'll be able to receive the new data in JavaScript and update the view.

A cross-platform way to do it is to use web sockets in the JavaScript world. Websockets allow a bi-directional communication channel between a WebView and a Server.

A third way, probably the most simplistic (but of course the feasibility depends on the amount and complexity of data you want to change, and your app flow), is to update the data locally on the phone and at the same time send a notification to the server to update the data. The next time you load your data from scratch from the server, the changes will be automatically delivered. Again, the ability to use this more simplistic approach depends on your application flow.

Best,

Martin

Hi Marcelo,

That sounds interesting, what data is the POI showing? Are you absolutely sure that the server does not add this POI unintentionally? Can you please check the server response to verify that this POI is not included in the response?

If it's not, please also check if the POI is added programatically somewhere in the JavaScript code unintentionally.

We are not aware that the SDK adds a POI to the renderer.

Thanks,

Martin

Hi Marcelo,

I'm glad to hear you could resolve the issue, and I hope you'll get around the server-location issue as well.

If we can help with any other Wikitude SDK related questions, let us know.

Best,

Martin
Login or Signup to post a comment