Tuesday, 5 April 2011

animated markers

found this
http://www.geocodezip.com/v3_animate_marker_directions.html

gives script on how to animate a marker also clearly divided up into its different sections so relatively easy to understand just to take take it apart and adapted  it to what i need for my ghosts
its slowly coming together

a bit of design



3 of my ghosts and a pac-man.
in relation to the game nearly have the polly-lines for the collectables done should be able to start game testing by the end of the week if all goes well, starting to change and look more at the look of the app

Friday, 1 April 2011

web hosts

finding it difficult to find a decent free web host that doesn't put loads of adverts over the page. instantfreewebsite.com is the worst i have found for ads. with 000webhosting.com having no adverts but is a very slow site

Wednesday, 16 March 2011

multi page web apps

ok so i found and adapted a bit of JS from iWebKit 5 that lets you make links to in web app mode that load in the same page which stops safari opening all the time if that makes sense

var multipage;

multipage=window.onload=function()
{
function fullscreen()
{
var a=document.getElementsByTagName("a");
for(var i=0;i<a.length;i++)
{


a[i].onclick=function()
{
window.location=this.getAttribute("href");return false
}

}
}
function hideURLbar()
{window.scrollTo(0,0.9)
}
multipage.init=function()
{
fullscreen();hideURLbar()
};
multipage.init()
}

just put the above in a .js file and linked it to every page and it works 
i win 

Sunday, 13 March 2011

arrays of arrays searching arrays, arrays

current


so i need to make another array for the lat lng's then add them to the right nds so need something like if (nds == id add lat , lon )? something like that just so the nds are searched to find the id that is the same to get the nds lat, lng if that makes sense

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