somethings from codeland

Friday, October 27, 2006

more on google maps

So I decided to do this instead of making a doc on my google account..

Here we go:

GMap2 api reference

every time a new instance of GMap2 is created another map is displayed on the screen.

So everything starts with:
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(37.4419, -122.1419), 13);
GEvent.addListener(map, "click", function() {
alert("You clicked the map.");
});


this will show a popup screen that says "You clicked the map." every time the user clicks the map

more on google maps

So I decided to do this instead of making a doc on my google account..

Here we go:

GMap2 api reference

every time a new instance of GMap2 is created another map is displayed on the screen.

So everything starts with:
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(37.4419, -122.1419), 13);
GEvent.addListener(map, "click", function() {
alert("You clicked the map.");
});


this will show a popup screen that says "You clicked the map." every time the user clicks the map.

you can add listeners (as demonstrated above) or bind them:

function MyApplication() {
this.counter = 0;
this.map = new GMap2(document.getElementById("map"));
this.map.setCenter(new GLatLng(37.4419, -122.1419), 13);
GEvent.bind(this.map, "click", this, this.onMapClick);
}

MyApplication.prototype.onMapClick = function() {
this.counter++;
alert("You have clicked the map " + this.counter + " " +
(this.counter == 1 ?"time" : "times"));
}

var application = new MyApplication();


onMapClick is a method that is bound to the event listener for this particular map (this particular instance of GMap2)

Wednesday, October 25, 2006

Back on Blogger

So there are all these blogs out there on various topics written by people with the intention of helping others. That's not my aim. I plan to use this as an open place to think, and if you find that the links are useful, then have at them..

I did want to say that I was recently inspired by the programming “Jedi” behind AnAppaDay.com. His new dedicated website is thesoftwarejedi.com

I am starting on AJAX on .net 2.0 at work this week, so I'll be going through the books on torrent sites, and working my way through I'm sure somewhere around 20 intro apps. We're integrating with Google maps, but the guys started writing logic without following up with some AJAX to keep the map “alive” after the logic is applied. I think its mainly markers, maybe directions right now. I think eventually the plan is to display full routes with actual routes taken (recorded via GPS) overlaid. So, this should be an interesting project to work on.

So for starters, here are my links that I’m checking out right now:

ASP.Net Ajax -- Atlas
Atlas docs -- ASP.NET docs
Atlas forums --
Google maps API -- Get API key
Google maps API docs -- documentation

Twitter Updates

About Me

My photo
I have been working with computers/programming to put myself through college since I graduated high school. I am currently attending Oklahoma State University for bachelors degree in biological sciences. Along with my experience in programming, a degree in biology will allow me to pursue a career in bioinformatics research concerning genetic diseases (i.e. cancer).

Blog Archive