_________________________________________________________
YUSSS, finally got the javascript going.
_________________________________________________________
Basically what i needed to do was add the key reference in web.config (which i had).
Add code in the page_init part of the aspx.cs file for loading the key into the head part of the page, so that google knows its valid.
Add a button
Add the code behind the button either in page_init or page_load.
code: Click Here!
Think i tried to rush into understanding it too quick, so what i did today was step back and learn different parts of it, such as testing if google maps even worked in basic html on my page, which it did. Then moved on a page.clientscript.register... to see if that worked even with the most basic alert function, which it did. So i didnt see why the google stuff shouldnt work now that i knew how to use a button.
I then came accross a couple of errors from google maps which slowed me down a bit, 'gmap2' is undefined and 'object expected'. I soon figured out that this was because i had commented out the code which set up my app key, which would mean that google wouldnt allow me to have a map.
Tomorow i am going to finish off the part i was stuck at, which is passing the finished lat,lng values from my array that i create into a map.
Hours: 5.5
LINKS
http://www.thescarms.com/dotnet/clientjava2.aspx
http://aspdotnetcodebook.blogspot.com/2008/03/handling-google-maps-api-keys-with.html
http://shepherdweb.com/2006/12/08/handling-google-maps-api-keys-with-aspnet-masterpages-and-webconfig/
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.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment