Jump to content


Photo

GM GeoLocation Testing


  • Please log in to reply
26 replies to this topic

#1 bobhoil

bobhoil

    GMC Member

  • GMC Member
  • 1567 posts
  • Version:Unknown

Posted 10 January 2012 - 07:57 PM

So I am developing a program in GM HTML5 that is geolocation based. Currently I have a map from google maps being drawn and it finding location. It does not save your location to any of my servers so do not worry about that. When you go to the page in a modern browser or even on a smartphone it will attempt to locate you on google maps and show your position. I plan on developing this into an html5 based game also in the future. So please let me know what browser you are using and if it works correctly.

Test GeoLocation
  • 0

#2 Takagi

Takagi

    GMC Member

  • Global Moderators
  • 4275 posts
  • Version:GM:Studio

Posted 10 January 2012 - 08:02 PM

It works for me, Google Chrome, 16.0.912.75 m. However, whenever I refresh the page, it shows my location as Hawaii...
  • 0

#3 bobhoil

bobhoil

    GMC Member

  • GMC Member
  • 1567 posts
  • Version:Unknown

Posted 10 January 2012 - 08:49 PM

It works for me, Google Chrome, 16.0.912.75 m. However, whenever I refresh the page, it shows my location as Hawaii...

Okay thanks for checking it out glad it worked somewhat. It was doing that to my and I thought I fixed it. Just did it again to me after a few refreshes. I will have to update it here and fix the problem. I have an idea of whats causing it.

EDIT: Did some more testing and can't seem to get the problem again.. hm

Edited by bobhoil, 10 January 2012 - 08:55 PM.

  • 0

#4 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Member
  • 15803 posts
  • Version:GM:Studio

Posted 10 January 2012 - 09:18 PM

I see Hawaii from the start. Oddly familiar. I seem to recall Google sending me to hawaii on address failure

A while ago I wrote this. I dont remember the exact details but I seem to recall having to make a thread to perform address validation

http://www.host-a.ne...ptimalRoute.zip
  • 0

#5 Rune

Rune

    GMC Member

  • GMC Member
  • 152 posts

Posted 11 January 2012 - 04:01 AM

Worked for me! Firefox 7.0.1.
  • 0

#6 kburkhart84

kburkhart84

    Firehammer Games

  • GMC Member
  • 1917 posts
  • Version:GM:Studio

Posted 11 January 2012 - 04:28 AM

Worked for me Firefox 9.0.1.

I think it works based off of the IP's information, but if you have an actual GPS, it could work with that, I didn't test that part.

In firefox, it told me that the site wanted to know my location. Before I allowed it, it was showing Hawaii, but once I did, it showed me in Dallas, TX, USA.
  • 0

#7 newkill

newkill

    Silver Sword Games

  • GMC Member
  • 1244 posts
  • Version:GM:Studio

Posted 11 January 2012 - 06:20 AM

It works (even after some refresh), Firefox 9.0.1
  • 0

#8 bobhoil

bobhoil

    GMC Member

  • GMC Member
  • 1567 posts
  • Version:Unknown

Posted 11 January 2012 - 07:21 AM

Wow thanks to everyone for testing, it is great to get all the feedback. I will be releasing the extension here soon once I implement a few more features so hopefully others can start to make some location based projects as I think it can really help GM HTML5 in some ways.
  • 0

#9 Mr Game

Mr Game

    GMC Member

  • New Member
  • 177 posts
  • Version:GM8

Posted 08 March 2012 - 10:57 AM

Goddamnit! It's more precise than my smartphone with A-GPS! ::lmao:: That's kinda scary..... :mellow: I use Google Chrome, version 17.0.963.66 m
Could I have some source code....please........ :(
  • 0

#10 TheMagician

TheMagician

    GMC Member

  • GMC Member
  • 460 posts

Posted 08 March 2012 - 07:05 PM

Doesn't work for me on Chrome (17.0.963.66 m) - it shows Hawaii although I am in Germany.
  • 0

#11 Mr Game

Mr Game

    GMC Member

  • New Member
  • 177 posts
  • Version:GM8

Posted 09 March 2012 - 10:35 AM

Doesn't work for me on Chrome (17.0.963.66 m) - it shows Hawaii although I am in Germany.

On the top of the site there's a bar asking you if you want to allow this site to track your physical position. You have to click "Allow"
  • 0

#12 NicroGames

NicroGames

    GMC Member

  • GMC Member
  • 300 posts
  • Version:GM:Studio

Posted 10 March 2012 - 07:51 AM

Yay! It says I live on Hawaii too, but unfortunately that isn't true...

EDIT: Worked when I clicked on "Allow"

Edited by NicroGames, 10 March 2012 - 07:52 AM.

  • 0

#13 GameDevDan

GameDevDan

    YoYo Games Staff

  • Administrators
  • 1213 posts
  • Version:GM:Studio

Posted 12 March 2012 - 02:03 PM

Google Chrome.

Starts on Hawaii for me too, but it is VERY accurate. Google usually detects my current location as the closest BT centre (who my broadband is with). This actually detected my house xD
  • 0

#14 bobhoil

bobhoil

    GMC Member

  • GMC Member
  • 1567 posts
  • Version:Unknown

Posted 13 March 2012 - 07:21 PM

Okay great I am planning on making this into a geolocation based game. If anyone wants the source please feel free to ask. Maybe I can just upload it and put it in the first post.
  • 0

#15 Mr Game

Mr Game

    GMC Member

  • New Member
  • 177 posts
  • Version:GM8

Posted 19 March 2012 - 05:14 PM

Okay great I am planning on making this into a geolocation based game. If anyone wants the source please feel free to ask. Maybe I can just upload it and put it in the first post.

I asked you the source a week ago.....
  • 0

#16 bobhoil

bobhoil

    GMC Member

  • GMC Member
  • 1567 posts
  • Version:Unknown

Posted 28 March 2012 - 03:38 PM

Mr Game I have instead of releasing the source created a tutorial so you can use Google Maps API. It is pretty simple but should get you started. Implement Google Maps API With GM

Edited by bobhoil, 28 March 2012 - 03:38 PM.

  • 0

#17 Mr Game

Mr Game

    GMC Member

  • New Member
  • 177 posts
  • Version:GM8

Posted 28 March 2012 - 04:52 PM

It looks like other gods than death gods are by my side.... *evil*

EDIT: Is possible something like 'gmaps_get_latitude()' and 'gmaps_get_longitude()' ?

Edited by Mr Game, 28 March 2012 - 05:03 PM.

  • 0

#18 bobhoil

bobhoil

    GMC Member

  • GMC Member
  • 1567 posts
  • Version:Unknown

Posted 28 March 2012 - 05:06 PM

You could create a function in the mapstest.js that can return such things yes. You would use position.coords.latitude and position.coords.longitude. You would need to create a function to return such details though.
  • 0

#19 Mr Game

Mr Game

    GMC Member

  • New Member
  • 177 posts
  • Version:GM8

Posted 07 April 2012 - 10:58 AM

You could create a function in the mapstest.js that can return such things yes. You would use position.coords.latitude and position.coords.longitude. You would need to create a function to return such details though.

But I don't know anything about JS.
Is there something that can do it?
  • 0

#20 MasterOfKings

MasterOfKings

    The True Master

  • GMC Member
  • 4888 posts
  • Version:GM8

Posted 07 April 2012 - 12:42 PM

Is there something that can do it?

Did you really just ask that?

I couldn't get it to work. It just sat there saying "Checking...". The map did show Hawaii, though. Even after allowing it to retrieve my location. Running Firefox 11.

Edited by MasterOfKings, 07 April 2012 - 12:56 PM.

  • 0

#21 bobhoil

bobhoil

    GMC Member

  • GMC Member
  • 1567 posts
  • Version:Unknown

Posted 07 April 2012 - 02:38 PM

Did you try loading it up again? It seems to work in every browser I tested it in that supports location.
  • 0

#22 Mr Game

Mr Game

    GMC Member

  • New Member
  • 177 posts
  • Version:GM8

Posted 07 April 2012 - 04:40 PM

Is there something that can do it?

Did you really just ask that?

For "doing that" I meant

You would need to create a function to return such details though.


  • 0

#23 bobhoil

bobhoil

    GMC Member

  • GMC Member
  • 1567 posts
  • Version:Unknown

Posted 07 April 2012 - 07:27 PM

You create the function in the php file I have you create. You can look through the documentation for the javascript api for google maps.
  • 0

#24 Mr Game

Mr Game

    GMC Member

  • New Member
  • 177 posts
  • Version:GM8

Posted 07 April 2012 - 08:15 PM

You create the function in the php file I have you create. You can look through the documentation for the javascript api for google maps.

I tried to look at the documentation and at the demos, but I don't get it. Couldn't you just implement those scripts as a part of your API for GM?
  • 0

#25 bobhoil

bobhoil

    GMC Member

  • GMC Member
  • 1567 posts
  • Version:Unknown

Posted 08 April 2012 - 12:47 AM

Well I didn't plan on creating an entire api out of it. I was mainly just showing what could be done. I guess I can go ahead and start working on a fully fledged extension that you can just load up and use.
  • 0

#26 Osmium

Osmium

    Graphic Artist

  • GMC Member
  • 308 posts
  • Version:GM:Studio

Posted 08 April 2012 - 05:03 AM

Working perfectly! :biggrin:
  • 0

#27 bobhoil

bobhoil

    GMC Member

  • GMC Member
  • 1567 posts
  • Version:Unknown

Posted 11 April 2012 - 04:38 AM

Great! I was hoping to see someone do something really cool with this eventually. Maybe like a social/geolocation game of some sort but maybe I will just have to do it myself! :thumbsup:
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users