Make Icon Function

With ever project there are always helper functions that do simple things. This function is something i created to help make icons for my WoWMap site. All you need to do is pass it an associative array (aka an object in JS) and it will return the google maps GIcon object customed with your options.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function makeIcon(options)
{
	var settings = $.extend({
		'image': 'icons/white.png',
		'shadow': 'shadow.png',
		'iconSize': [24,28],
		'shadowSize': [36,24],
		'iconAnchor': [12,27],
		'infoWindowAnchor': [20,3]
	}, options);
 
	var base_icon = new GIcon(G_DEFAULT_ICON);
	base_icon.image = 'assets/img/'+settings.image;
	base_icon.shadow = 'assets/img/'+settings.shadow;
	base_icon.iconSize = new GSize(settings.iconSize[0],settings.iconSize[1]);
	base_icon.shadowSize = new GSize(settings.shadowSize[0],settings.shadowSize[1]);
	base_icon.iconAnchor = new GPoint(settings.iconAnchor[0],settings.iconAnchor[1]);
	base_icon.infoWindowAnchor = new GPoint(settings.infoWindowAnchor[0],settings.infoWindowAnchor[1]);
 
	return base_icon;
}

I use the jQuery extend function to merge the any provided options with the default options.

If you want to use this with your site you will need to change the url for the image and shadow property on line 13 and 14. You can also extend this to edit the other properties of the GIcon object, these are just the basic ones needed to customize (at least for me).


Night Elf Mohawk Autotune

I love autotune (not sure if i wanna buy the app yet) so when i saw it on Tribunalxhunter.com i had to make a post and share it.


Omg Its Finely 2010

Well looks like its finely ‘the future’. Its finely 2010, and its pronounced ‘twenty ten’ not ‘two thousand ten’… Get it right.

Now that its ‘the future’ i feel the urge to go watch movies released back in the 90s or late 80s to see what they thought the future would be like. Flying cars and crazy looking cities. I think i saw one movie where we had time travel or something.

I know its been a while since iv posted so ill make one long ass post to make up for it. First ill a few things iv done since my last post.

Loremaster

In WoW iv been doing alot of quests for the Loremaster achievement. I just started Eastern Kingdoms in the hope that it will give me the last 32 i need for Kalimdor.

WoWMap

I switched my wowmap to use the Kohana php framework. Over Codeigniter it is strict PHP 5 coding and it does not limit your access to global data like $_GET (the main problem i was having with CI). The only i dont like about it is, it doesn’t have a awesome name and logo like Codeigniter. I also updated the layout to have hover menu instead of a side bar panel, along with a nice WoW-ish theme. I like how it turned out.

Home Server

I thought it would be fun to have my own server, one where i could have my local AMP server running, maybe even vent and other stuff. Got and installed Kubuntu on one of my old computers (10 year old Sony Vaio). Set everything up good. Pushed it in to the corner, turned it on, and SSHed into it just fine. Turned it off for the night and in the morning it stopped working. Lame


Onyxia Wipe Animation

onyxian_whelpAs you are aware (or at least you should be) blizzard has referenced this video several times since they released the new level 80 Onyxia raid a while back. Two are achivements, [Many whelps, handle it], [More dots] and of corse the [Onyxian Whelpling].

A couple days ago I got bored and went to watch the video, but two seconds in I desided to transcribe the whole thing. Took me about 15 minutes. After the break I’ll post the video and after that I’ll post my transcription.

Continue reading →