geolocation API puzzle

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by natehill on January 25, 2011 at 4:43am

Forgive me if I'm posting this problem in the wrong place, I'm new around here. Hoping someone in this group could help me with a geolocation API puzzle.

I've got a mobile project that uses the geolocation API to create some google maps/directions based on the user's location.
Everything works just fine as a simple HTML site, but I want to do this in Drupal so that I can get some commenting and interactivity with the users.

I'm currently playing around with Drupal 7 installed locally... using MAMP.
The theming and layout is pretty straightforward, I'm getting it, but geolocation isn't working in Drupal.

Firebug shows me the error:
"provider is null", citing line 62 of geo.js which is "provider.getCurrentPosition(succsssCallback,options);

Anyone have any ideas? Are there things I should be trying to debug this?

Thanks!

Categories:

Comments

hey there, from the name

Posted by seutje on January 27, 2011 at 11:11pm

hey there,

from the name "geo.js" and the object and method names you mentioned, I assume you are using http://code.google.com/p/geo-location-javascript/

Have you tried looking at the samples at http://code.google.com/p/geo-location-javascript/source/browse/trunk/ ?
Note the if(geo_position_js.init()){

Figured it out-

Posted by natehill on January 28, 2011 at 2:38am

It was a syntax issue: I forgot to wrap the jQuery and somehow that screwed things up. Thanks for your reply-

HTML5

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /