Layar Developer Documentation

Back to

Test a Layer

In this section, we will introduce how to test your layer.

API test page

On the publishing site, we provide the API test page which helps test the request/response from your web service and see the Layar server's logs to track down any issues.

To open the API test page, click on the "Test" button for a layer in the publishing site environment (see screenshot below).

The settings provided on the API test page are used to define request parameters in GetPOIs request, please see table below:

API test page settings Parameter in GetPOIs request Example
Layer name layerName housing
Api version version 8.3
Textbox  SEARCHBOX ""
Search Range radius 1500
GPS Accuracy accuracy 100
Country code countryCode international
Language lang EN
Phone location lat & lon 52.36569, 4.89297

Please NOTE that Layar server is validating the JSON response based on the Api version selected on the API test page. Please make sure that you select the right version. If the layer should work on various layar clients (check the Minimum API version setting on the publishing site), for instance both layar v7.1 and v8.3, please make sure you check it against these API versions.

Once these settings are defined, click on "Load POIs" button to see the GetPOIs-JSON Response (see screenshot below).

In Console view, we can see the GetPOIs request that was sent. If the GetPOIs response is valid and Spots are returned within the search range, spots information under "POI list".

The API test page has the same validation rules implemented as Layar client running on the phone. All the error messages are highlighted in red.

In general, the following issues can be detected:

1. Serious issues (no POIs are returned)

Quite often in the console view, it says "error validating provider response + many error messages sent back from the server". This means that the GetPOIs JSON response is not valid, therefore, it could not be accepted by the layar server. To valid JSON response, please copy GetPOIs request into a JSON validator (for instance, don't forget to use the 'View source' option, you may not see the entire response in your browser window). Please NOTE that sometimes it might be a valid JSON according to those json validation tools but might not be validated according to Layar API. In this case, please double check whether you have returned the correct JSON response according to the API specification.

Please check whether your web service is still reachable. There is a 10 sec time out threshold on Layar server, please make sure that your web service returns a GetPOIs response within 10 secs.

2. Normal issues (issues that should be fixed for better performance and user experience on the phone)

2. Test on the phone

Of course, to make sure that your layer works as you expected. The best way is to test it on the phone. To test your layer on the phone, please take the following steps:

The developer settings (fixed location settings, etc) can be found by following the steps below:

Please NOTE that for test layers, the changes in layer editing section should take place in layar client immediately, except that the image/icon might be cached and they will be changed within 5 to 10 mins.

This is the end of this section, if you think your layer is functioning good and you want to request for publication approval, please test your layer against Layer testing instructions .