Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

search for errors in javascript

I have built a page based on your map api. I have used different variable from you and have tried to change them in the sample javascript you gave. However When I click on 'Get Markers From DB' I get what appears to be a javascript error refering to a variable which I am unable to locate in the code...

The error is as follows:

pre
Uncaught ReferenceError: convert_address is not defined VM405:160
convertAddress VM405:160
Apperyio.DataSource.responseMapping.TRANSFORMATION VM405:157
Apperyio.RenderVisitor.$a.createClass.afterArrayElementVisit appery.js:842
Apperyio.RenderVisitor.$a.createClass.execNextPlanEntry appery.js:1115
executeMappingPlan appery.js:988
Apperyio.RenderVisitor.$a.createClass.visit appery.js:1008
Apperyio.DataSource.$a.createClass.updateComponents appery.js:1416
Apperyio.DataSource.$a.createClass.successHandler appery.js:1422
Apperyio.DataSource.$a.createClass.responseDataHandler appery.js:1450
proxy jquery-1.9.1.js:818
fire jquery-1.9.1.js:1037
self.fireWith jquery-1.9.1.js:1148
done jquery-1.9.1.js:8074
callback jquery-1.9.1.js:8598
/pre

This makes sense as I do not have a var called convert_address, mine is called convertAddress.

I can't seem to find the reference for convert_address anywhere.

Is there a way I can search my application for an occurrence of a string?

Thanks,

Terry

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

search for errors in javascript

Hello Terry,

In the right side of each error is a link to the particular place where this error occurs. Just click this link and inspect your code.

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

search for errors in javascript

THanks, Evgene, I tried this but the link doesn't work, perhaps because the app seems to have hung.

Update...
I have changed my service name to convert_address as this seemed the easiest fix. It almost works correctly now apart from two issues:

  1. it only sets one marker which is the last entry in the DB. The other two are not placed on the map.

  2. The map zoom is too close and you can only see the marker. pressing the '-' key on the map zooms out to find that the other markers are not present.

    Thanks, Terry

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

search for errors in javascript

Hello Terry,

Please inspect thoroughly implementing of this tutorial: http://docs.appery.io/tutorials/using...
To avoid errors you should use the same names of variables and functions

Return to “Issues”