PDA

View Full Version : Phonegap + map



kevinv1990
16 Dec 2010, 2:14 AM
Hey all,

I want to make the app i created native, so I am trying to get the working (almost) webapp as a native app.

Got the following problem, the markers won't show on the map, I think there is something from with the:


currentLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
That google.maps.Latlng, doesn't seem to work.



Kevin

Riddler
16 Dec 2010, 2:50 AM
me too ;-)

You have to link google maps before use it ...

like this:
<script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script type="text/javascript" src="sencha-touch-debug.js"></script>

and other your's .js file ...

HTH

--
Riddler ?

kevinv1990
16 Dec 2010, 6:31 AM
Thanks a lot Riddler!!!

Map is now working yeee :D

Riddler
16 Dec 2010, 6:42 AM
Thanks a lot Riddler!!!

Map is now working yeee :D

de nada pr nada ;-)

--
Riddler ?

Juvs
7 Apr 2011, 1:08 PM
Just make sure to include in you config.xml access to google maps domains:


<access subdomains="true" uri="http://gstatic.com"/>
<access subdomains="true" uri="http://google.com"/>
<access subdomains="true" uri="http://googleapis.com"/>

ChrisLad
5 Jun 2011, 10:51 PM
Hi,
I tried exactly as suggested above and added the access elements to the config but when I run the app in a Blackberry siumulator I get:

JVM Error 104 Uncaught: NullPointerException

Anyone got any ideas what is causing this?

Please help me !!! arrgghh!!:((

FranciscoAlexis
17 Aug 2011, 6:18 AM
Sorry to bother but the config.xml has to be in the "www" folder? and i just have to add those lines?