Monday, 28 February 2011

progress ?

so at this stage i don't have loads of time left however with help i have gotten the map data from the xml from openstreetmap.org into an array :)
at the moment the format it
nd (street id numbers)
ref(a reference number to every latlng for that street)
so all i need to do know is use the ref to get the lat and lng and return it to the array(sounds a lot easier than it is)
making a two dimensional array in javascript isn't that simple because javascript doesn't have a pre defined variable so you have to build an array within an array
http://www.javascriptkit.com/javatutors/twoarray1.shtml(just discovered the link tool)

after i have done that i need to pass the information from the array to a function to make the polly lines for the roads, then add all the markers
my project seems to be full of loops

if i can get this to work soon i need to move to plan B and just randomly place markers over the screen and then just have it so when the user is close to a marker they score points

Saturday, 22 January 2011

possible break

ok so after a lot more help im now looking to us map data from openstreetmap.org to get all the latitude and longitude information for the roads around the user then use that to create a polly line which i can place markers on it dosent seem too complex at first glance but we shall see one massive benefit is that the site lets you export the map data as an xml so i can then just link the xml to my site to get the date one restriction is you cant get the date for the whole map just sections so to develop this web app so it can work anywhere i would need to divid the world map into grids down load the xml then give each an latlng area reference that would then be used with the users location to load the right xml for the users location but thats just me getting a head of myself need to get this working first

Thursday, 23 December 2010

3 steps forward 2 steps back

ok so found out a few good things there is a site called psd2css.com which u upload a web site in .psd formate u have to name things a outlined way but the site then codes it up for you u can even add a blank layer so it knows its for iphone and it will add all the iphone attributes also adds the ability to to have multiple pages load in one window have started to play with this site. can do something similar with jquery which is mentioned a lot online for web app development, seems to be a massive css and js library. one other way to have multiple pages load on one page i found was to make it one page then hide parts of it so when buttons are clicked it hiddes and revels the 'pages'. still having problems with the core game mechanic but getting there slowly

Monday, 6 December 2010

update

seems i mainly put issues up on this blog but still having a function issues im trying to have to functions that get the same information on gets the users location to centre the map and the other follows the users location to solve this im basically reformatting my code and making more var and functions so making my code more complex but easier fun.

Thursday, 2 December 2010

road mapping

so after a lot of searching a very nice guy called larry posted this link on the google code forum
http://maps.forum.nu/gm_driving_radius.html
now it is basiclly what i need to place all my colletables on the screen however, to do it to the zoom level i want it may take a while to load and it may miss roads but that not too much of an issues.
one issues is that the google direction tool has a quota so the app may stop working with exstended use however this app is going to be made for walking use so a user would prob have to use the app for a few hours for the quota to be reached.

Monday, 29 November 2010

trail and error

so at the moment im trying to play with different code to get all my collectables to come up on screen.
im just about to try this
-getting the maps visible area
       -then getting all the road names in the visible area
            - place markers alone the visible roads at x distance apart

another issues that has recently occurred is that as the user moves the whole map refreshes which means the  map flickers which is a problem i think this is due to the fact the centre of the map is set to the users location so as the user moves the map dose to so to fix this im going to try this
- getposition set map centre
    - place marker at watch position
(doing this the map will get the user location load and be static then only the marker will follow the user)
         -when marker leaves visible area get position set centre

this should then move the map when the user leaves the visible area hope this fixes the current issues