O'Reilly Forums: Geo2Json-Map-Problem - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Geo2Json-Map-Problem not getting coordinates on map(page-113,135)

#1 User is offline   @vid@vi 

  • New Member
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 08-September 12
  • Gender:Male
  • Location:Delhi (India)
  • Interests:Everything related to computers and technology plus chess plus being cool.!!!

Posted 08 September 2012 - 10:35 PM

Refer to page-113.I wrote everything well, the program is working good, but when i opened the map.html webpage, my coordinates aren't showin..,i just get the default coordinate (that is something with speed=21) i have placed my output.json file and the map.html page in the same folder, even the code and .exe file is also on the same folder.

Refer to page-135. Also the Bermuda tool piped with geo2json tool isn't showin up as expected, its the same output i am gettin.

i have attached the screen print of my gpsapp directory. (the concerned directory)

Attached File(s)


[font="Comic Sans MS"][size="6"][s][b]VENI VEDI VINCI
(I came, I saw, I conquered)[/b][/s][/size][/font]
0

#2 User is offline   rubenpgarcia 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 20-September 12

Posted 20 September 2012 - 08:56 PM

View Post@vid@vi, on 08 September 2012 - 10:35 PM, said:

Refer to page-113.I wrote everything well, the program is working good, but when i opened the map.html webpage, my coordinates aren't showin..,i just get the default coordinate (that is something with speed=21) i have placed my output.json file and the map.html page in the same folder, even the code and .exe file is also on the same folder.

Refer to page-135. Also the Bermuda tool piped with geo2json tool isn't showin up as expected, its the same output i am gettin.

i have attached the screen print of my gpsapp directory. (the concerned directory)



I had the same problem until I zoomed in. Try zooming in on it.

This post has been edited by rubenpgarcia: 20 September 2012 - 08:58 PM

0

#3 User is offline   @vid@vi 

  • New Member
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 08-September 12
  • Gender:Male
  • Location:Delhi (India)
  • Interests:Everything related to computers and technology plus chess plus being cool.!!!

Posted 28 October 2012 - 05:42 AM

Its not working, even after zooming.
can you write the steps of what you did?

p.s- i am downloading the map application webpage by doing right click and save as.

This post has been edited by @vid@vi: 28 October 2012 - 05:55 AM

[font="Comic Sans MS"][size="6"][s][b]VENI VEDI VINCI
(I came, I saw, I conquered)[/b][/s][/size][/font]
0

#4 User is offline   kgashok 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 26-August 10

Posted 30 October 2012 - 09:20 PM

View Post@vid@vi, on 08 September 2012 - 10:35 PM, said:

Refer to page-113.I wrote everything well, the program is working good, but when i opened the map.html webpage, my coordinates aren't showin..,i just get the default coordinate (that is something with speed=21) i have placed my output.json file and the map.html page in the same folder, even the code and .exe file is also on the same folder.

Refer to page-135. Also the Bermuda tool piped with geo2json tool isn't showin up as expected, its the same output i am gettin.

i have attached the screen print of my gpsapp directory. (the concerned directory)


This works for me. Actually, all I have is the output.json file and map.html in the same directory.
I changed the last speed entry (to 55 or something) in my output.json file and it reflects correctly in map as well.
Make sure you are clicking on the LOCAL html file and loading it in your browser.

I have attached the html file for your reference.Attached File  map.html (5K)
Number of downloads: 86

This post has been edited by kgashok: 30 October 2012 - 09:22 PM

0

#5 User is offline   @vid@vi 

  • New Member
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 08-September 12
  • Gender:Male
  • Location:Delhi (India)
  • Interests:Everything related to computers and technology plus chess plus being cool.!!!

Posted 08 November 2012 - 06:07 AM

View Postkgashok, on 30 October 2012 - 09:20 PM, said:

This works for me. Actually, all I have is the output.json file and map.html in the same directory.
I changed the last speed entry (to 55 or something) in my output.json file and it reflects correctly in map as well.
Make sure you are clicking on the LOCAL html file and loading it in your browser.

I have attached the html file for your reference.Attachment map.html



Can you please upload your concerned folder which contains the json file and map.html.
[font="Comic Sans MS"][size="6"][s][b]VENI VEDI VINCI
(I came, I saw, I conquered)[/b][/s][/size][/font]
0

#6 User is offline   kgashok 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 26-August 10

Posted 08 November 2012 - 07:41 AM

I don't think I can upload or attach folders into the forum. Just download the map.html file I had attached in my previous email into any folder of your choice. Place your own output.json file in the same folder. Click on the map.html file in your folder and it should load in your browser with starting with "file://" in the address box. It should work. Cheers,

This post has been edited by kgashok: 08 November 2012 - 07:46 AM

0

#7 User is offline   rattlerone 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 30-June 13

Posted 30 June 2013 - 11:47 PM

Hi, I've tried to get this to work with no success. When I download http://oreillyhfc.appspot.com/map.html it shows the coordinates even before I've put in my .json file. When I change the coordinates in the .json file to

{latitude: 59.362530, longitude: 17.087936, info: Speed = 16},
{latitude: 59.362457, longitude: 17.087059, info: Speed = 16},
{latitude: 59.362385, longitude: 17.086182, info: Speed = 21}

I still get the the old coordinates and markers.
Have saved the file, put it in the same folder as map.html and maps_files folder.

Have uploaded my .json but added txt.

What am I doing wrong?

Attached File(s)


0

#8 User is offline   Adam Cheung 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 30-September 13

Posted 30 September 2013 - 01:58 AM

View Postrubenpgarcia, on 20 September 2012 - 08:56 PM, said:

I had the same problem until I zoomed in. Try zooming in on it.

I had the same problem as well. God knows how long time I struggled on this!!!
Just now I did the zoom in, and it really worked. :-)
0

#9 User is offline   durtreg 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 08-December 13

Posted 08 December 2013 - 10:13 AM

This does not work on a local file system. I have tried basically anything that I can think of.

I tried downloading it with: chrome 31.0.1650.63, internet explorer 11, firefox 22 on windows 7 and Fedora 17 Linux.
Some create a folder with all sorts of files including output.json, some just map.html and output.json, some just map.html.

Now when I reload the file locally into the browser I get either: no image at all or just the world without any markers.
Zooming doesn't make any difference. I tried opening it in all the browsers above, none work.

If I upload the map.html and json file to a webserver, then open it in a none-local URL, then it works - just *not* locally in any browser.

If someone could paste a complete folder/file combination with the exact way of opening it and if possible browswer-version and operating system?
0

#10 User is offline   Vesnog 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 01-March 14

Posted 01 March 2014 - 10:13 AM

I am having similar problems on Ubuntu 12.04.3 LTS with the latest edition of Chrome and Firefox web browsers. So far I have tried the two browsers while saving the webpage as complete and the command wget in the terminal with the option -mk. By the way I should mention that a blank page is displayed when I launch the html file of the complete webpage after saving. What may be the reason behind this?

Thanks in advance
0

#11 User is offline   Adam Howard 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 30-April 14

Posted 30 April 2014 - 01:03 PM

View PostVesnog, on 01 March 2014 - 10:13 AM, said:

I am having similar problems on Ubuntu 12.04.3 LTS with the latest edition of Chrome and Firefox web browsers. So far I have tried the two browsers while saving the webpage as complete and the command wget in the terminal with the option -mk. By the way I should mention that a blank page is displayed when I launch the html file of the complete webpage after saving. What may be the reason behind this?

Thanks in advance


Here is how I got this working on Arch Linux, Firefox 29.0: by examining the dev console as map.html loaded, I noticed that it attempted to load a file located at file:///mapfiles/markers2/marker.png. My guess is that there is a relative path somewhere in the Maps API for loading the marker image that normally points to something like api.google.com/mapfiles/markers2/marker.png. Obviously, that isn't going to work so well for a local html file. Since I didn't really want to dig around too much in the API docs or mess around with the html, I just found a suitable icon for a marker, named it marker.png and put it in the right directory. Once that file was in place, reloading map.html caused the markers to pop up on the map (although I had to zoom way in to get them to not all be right on top of each other). Hope this helps someone else searching for this issue later!
0

#12 User is offline   thornoff 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 21-June 14

Posted 21 June 2014 - 06:17 AM

View PostAdam Howard, on 30 April 2014 - 01:03 PM, said:

Here is how I got this working on Arch Linux, Firefox 29.0: by examining the dev console as map.html loaded, I noticed that it attempted to load a file located at file:///mapfiles/markers2/marker.png. My guess is that there is a relative path somewhere in the Maps API for loading the marker image that normally points to something like api.google.com/mapfiles/markers2/marker.png. Obviously, that isn't going to work so well for a local html file. Since I didn't really want to dig around too much in the API docs or mess around with the html, I just found a suitable icon for a marker, named it marker.png and put it in the right directory. Once that file was in place, reloading map.html caused the markers to pop up on the map (although I had to zoom way in to get them to not all be right on top of each other). Hope this helps someone else searching for this issue later!


Hi,

I have the same issue that the mapfiles/markers2/marker.png can't be loaded. I tried your suggestion but couldn't solve the issue. Where exactly is the 'right directory', in the same directory where you put the map.html? And did you change anything else? did you just download the map.html and added your own marker.png?

Thanks in advance!
0

#13 User is offline   furkant 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 30-August 14

Posted 30 August 2014 - 02:18 PM

OS : Ubuntu 14.04
Browser : Mozilla
I had the same problem as you but now, I found the EXACT solution. So what I did :

1- I installed Apache Server. (Actually I already had)
2- Opened http://oreillyhfc.appspot.com/map.html and ctrl+s and saved as "All Files" (Not "Web Page, Completely") to my geo2json project folder.
3- I move geo2json project folder to localhost. (Made like that : /var/www/html/geo2json/)
---Don't forget to be root to be able to move file => sudo -i
---Move command => mv geo2jsonFolderLocation /var/www/html
4- Then opened my browser (Mozilla) and linked localhost/geo2json/map.html

And it worked ! I think there is a problem about localhost.

Posted Image

This post has been edited by furkant: 30 August 2014 - 02:19 PM

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users