Page 6 of 8

Geolocation Tracking App

Posted: Tue Apr 16, 2013 2:20 am
by Igor

HI,

Error "NOT_FOUND" because you didn't initialize map on JavaScript1 file.

precode
var mapOptions = {
zoom:7,
mapTypeId: google.maps.MapTypeId.ROADMAP,
center: chicago
}
map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);
/code/pre

About geocoding javascript, you can add javascript on separate file and call javascript function on element action to use on different pages.


Geolocation Tracking App

Posted: Tue Apr 16, 2013 5:07 am
by Joe Paisley

So in my limited programming experience(obviously virtually none) I added the "map = " line in my javascript1, replacing "map-canvas" with "directionsMap" and I've also added some reverse geocoding javascript, but I'm not really sure what I'm doing there either. I haven't had time to watch the webinar, but is there instructions or a walk through on how to do this? I'll try to watch it tomorrow, but in the meantime, in my haphazard adding of javascript in "javascript1" I've managed to cause plenty of errors I'm sure, definitely due to the fact that the code is added incorrectly. Could you please take a look and give me some guidelines on what I need to add or remove? And how I might map the REST data service for reverse geocoding? Thanks so much.


Geolocation Tracking App

Posted: Tue Apr 16, 2013 1:17 pm
by Kateryna Grynko

Hi Joe,

In JavaScript1 asset you added:codemap = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);/code
But didn't add before:codevar mapOptions = {
zoom:7,
mapTypeId: google.maps.MapTypeId.ROADMAP,
center: chicago
}/code
Also, on Map page Load you call displayDirections function that should be called on "Get Directions" button click. Maybe you should delete this action. Then page will be loaded correctly.


Geolocation Tracking App

Posted: Tue Apr 16, 2013 1:33 pm
by Joe Paisley

Hmmm, you're right. How did that get there? Well, I deleted it, and it didn't fix anything. Interesting. I'll try to upload a screenshot of the log in Eclipse ASAP, but in the meantime if you find the solution, that would be great. Thanks!


Geolocation Tracking App

Posted: Tue Apr 16, 2013 5:57 pm
by Joe Paisley

When I set up the REST service for reverse geocoding in this example: https://getsatisfaction.com/tiggzi/to...

What's the url I need for my "reverseGeo" service?

What value do I add for latlng parameter?

Once this is finished, the response should populate automatically when I press "test" in the test tab right?

I'm not getting anything now, other than the 404 error.


Geolocation Tracking App

Posted: Tue Apr 16, 2013 6:39 pm
by Maryna Brodina

Hi,

  • URL codehttp://maps.googleapis.com/maps/api/geocode/json/code

  • Method: GET

  • Data Type: json
    Request parameters:

  • latlng: - 40.714224,-73.961452

  • sensor: true

    Yes, response should be populated automatically.


Geolocation Tracking App

Posted: Tue Apr 16, 2013 10:22 pm
by Joe Paisley

So I've tried to follow this discussion: https://getsatisfaction.com/tiggzi/to...

and I've added the correct url and latlng parameter. I get the same error as the gentleman in that discussion: Image

Also, for whatever reason, it wouldn't let me map my Geolocation service. In my "reverseGeo" service I think I accidently mapped something and I don't know how to undo it. Image
And I added the recommended javascript to the "latlng" parameter in "reverseGeo."

Now, for whatever reason, I'm getting an error after facebook login and on the "website" page load. I must have inadvertantly changed something to affect the google adwords code: This is what it looks like in the console:
Image
Thanks for your patience and help!


Geolocation Tracking App

Posted: Tue Apr 16, 2013 10:34 pm
by Alena Prykhodko

Hi!

As to wrong mapping: try Firefox browser, there mapping is shown with arrows, you can point it and delete wrong one.
According to others questions I'll update as soon as possible.


Geolocation Tracking App

Posted: Wed Apr 17, 2013 12:12 pm
by Kateryna Grynko

Hi Joe,

In request parameter "latlng" for Geocoding service should be no spaces. Replace
code- 40,714224,-73.961452/codewithcode-40,714224,-73.961452/codeThen service will return correct address data.

In "JavaScript1" asses there is an incorrect JS code - closing brace missing:
codevar mapOptions = {
zoom:7,
mapTypeId: google.maps.MapTypeId.ROADMAP,
map = new google.maps.Map(document.getElementById("directionsMap"), mapOptions);/code


Geolocation Tracking App

Posted: Wed Apr 17, 2013 1:07 pm
by Joe Paisley

So I added a } after mapOptions);
And I've attached a screenshot of my Geolocation1 data mapping on my "map" page. Hopefully you can see it. Image
And I'm still getting that Google Adsense Error. That thing is the bane of this app's existence. Here's the rather extensive log of what occurs on page "website" load.
Image Image Image
Thanks for your help!