Welcome

I'm a student and this blogg has been created to keep information on a daily to weekly basis about my project that i am doing to get my Bachelor of Information Technology. This is based on my progress, and a place to put all of my information, not entirely a proper blogg. Though sometimes i feel like i'll be talking to myself... Any ways, enjoy and feel free to comment. If your wondering what this project is and dont want to read every single post, just go to the Proposal link, or any of the "posts worth looking at" below.

Friday, March 21, 2008

21/3 Mini Routing Application

_________________________________________________________
Start 8.3o a.m.
_________________________________________________________


I was going to do some coding but its too early. Instead for this morning i am going to read some of my C# book.

_________________________________________________________
Finish early. 2 hours.
_________________________________________________________

Thursday, March 20, 2008

20/3 More Routing

_________________________________________________________
Start 9.oo a.m.
_________________________________________________________

HI! So i am sick atm, so havent been getting much done, had tues and weds off, and was just lazy on monday, so today i am gonna try make up some hours. Because i'm still sick it may be a slow process. Here is what i did between 9 and 12, i have been going through the rest of the book about google maps and seeing what i can find useful in there. After lunch i am starting on polylines.

************************************************************************
Break 12.00 p.m. Lunch
************************************************************************
_________________________________________________________
1.oo p.m.
_________________________________________________________


So this morning what i did was go through the tutorial in the book and add different functionality, and 'try' to add certain features. Now i have moved onto polylines. AND omg i spent ages figuring out why the map wouldnt show up when i was drawing a polyline using values in an array, so naturally i thought there was somethign wrong with the more complicated array code, but noo, apparently it was the fact that i was calling onload="onLoad()"... when i should have been using onload="load()" *twitch*.

Other than this, its all good, will go back to the more complicated polyline examples... haha.

************************************************************************
3.15 p.m. Short make a cup of tea beak
************************************************************************


Mmmm chai tea. Back to polylines.

Here you can click and add lines. This is done by adding the points clicked to an array and drawing the lines between the points.

points.push(point);
if (points.length > 1) {
route = new GPolyline(points);
map.addOverlay(route);
}

_________________________________________________________
6.3o p.m.
_________________________________________________________

OK, I have been figuring out the routing part of google maps. Here is a very basic example. What i have spent the rest or majority of the time doing is figuring out how to create a route based on two locations that a user clicks. Ive got it right so far, the only problem i'm having right now is figuring out the syntax in which i load directions based on the arguments i produce. I have to send it two variables:

myStart = points[0];
myEnd = points[1];
//directions.load("5 Tahunanui Drive, Nelson, New Zealand to 8 Hardy Street, Nelson, New Zealand");
directions.load(myStart + "to" + myEnd);

The code highlighted red works fine, but the yellow code is what i need to get working, so i can instead pass it the co-ordinate values in the array. Any ways, back to looking at examples and seeing how other peoples code works :P.

I'm so happy :'( *sniff*. I figured out how to get directions using two points a user selects on the map. Lets start from what i was trying to do here. I was trying to use the normal load function and pass in lng and lat values. Apparently to do this you need to pass in an array using the loadFromWaypoints function. Compare the above code to this:

fromAddress = points[0];
toAddress = points[1];
directions.loadFromWaypoints([fromAddress, toAddress]);

So I needed to pass the co-ordinate values in as an array, and google will accept this. So click HERE!!!! to use this funcion and select two waypoints ;)


************************************************************************
Break 7.30 p.m. Visitors, *spesh*
************************************************************************

_________________________________________________________
9.0o p.m.
_________________________________________________________


So far i have done:



  1. Geocoding (grabbing co-ordinates, getting address points from co-ordinates) <-- Here
  2. Creating markers on the page by clicking and getting these long/lat co-ords <-- Here
  3. Make a map that makes a route from one place to another <--Here
  4. Format and get the directions information and display this <--Here

To do:

  1. Make the same route add on another end point
  2. Get more info on how to implement google maps into an app (curiosity)
  3. Figure out how their drag and drop of routes works

NEXT???? Now i shall add another end point and maybe allow the user to type in an end point.

I am making a full app that incorporates most of these features. You can view what i have done so far in version 1.0 :P. BUT alas it is time to sleep. When i finish the coding and fix my bugs (or figure out how to program) i will comment on all of the functionality this app can do. So far you can make a route from the last place you stopped to the next you click at, but ultimately i want to make a continuous route.

HERES VERSION 1.0

_________________________________________________________
Finish 12.0o a.m. 12ish hours? AHHHHHH MY BRAINSSSS
_________________________________________________________


LINKS

http://code.google.com/apis/maps/documentation/services.html
http://code.google.com/apis/maps/documentation/examples/directions-advanced.html
http://code.google.com/apis/maps/documentation/reference.html#GDirectionsOptions
http://code.google.com/apis/maps/documentation/services.html#Geocoding_Structured
http://groups.google.ie/group/Google-Maps-API/browse_thread/thread/cb44b4727158e9e3
http://groups.google.co.nz/group/Google-Maps-API/browse_thread/thread/688f08744bb377b5/dba97d6e7c39468d%23dba97d6e7c39468d
http://code.google.com/apis/maps/documentation/services.html
http://www.capelinks.com/cape-cod/maps/geocode/
http://www.developer.com/lang/jscript/article.php/3615681

Monday, March 17, 2008

17/3 Routing

_________________________________________________________
Start 8.oo a.m.
_________________________________________________________


Today i will be looking at the feasibility of integrating a routing system for creating routes, or making my own algorithm.

So atm i am looking at a book called Hacking Google Maps and Google Earth by Martin C. Brown.