This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I'm attempting to develop a basic app on XDK (cross platform) and all I want it to do for now is find the current user's location on the map. I'm using the basis of a map which currently is hard coded to locate to Sydney. I have tried different things such as declaring lat as position.coords.latitude and the same for longitude but any time i place them in instead of hard coding, no map even prints to the screen. Find my code below. Any help would be much appreciated.
From what I can see from the documentation at getCurrentPosition Method, you have to pass a function which accepts a parameter to the method. The parameter, naturally enough, represents the current location. Your "initialize" method doesn't do that, and therefore you can't write code which uses that location parameter.