-
May 02, 2007
Craigslist and Google Maps Mashup Thingy: Day 14 – Getting Jquery and Prototype to Work Together
Whoa, that’s a doozy of a title! Anyway, today I was working on making the mashup look prettier and actually somewhat usable for human consumption. I was using thickbox to get some pretty snazzy ajax stuff going on for displaying the about page and whatnot. Today, I included prototype for some even more snazzy ajax stuff. But apparently they clash.
I guess both of them like using the ‘$’ character as a shortcut to make the code easier to read. Which means they have crazy namespace conflicts. Bad developers! Anyway, here’s how I got it to work. Right after the import of the jquery library, I set the ‘$’ thing to be ‘$j’ instead. Then I refactored thickbox to use the ‘$j’ name instead. It worked. Here’s what the head looks like:
<br /> ...<br /> <script type="text/javascript" src="/js/jquery-latest.pack.js"></script><br /> <script>var $j = jQuery.noConflict();</script><br /> <script type="text/javascript" src="/js/thickbox.js"></script><br /> <script type="text/javascript" src="/js/prototype.js"></script><br /> ...<br />
-
May 01, 2007
Craigslist and Google Maps Mashup Thingy: Day 12+13 – Dot Com and Cities
So I worked on the mashup quite a bit yesterday. So much that when I was done, I was too tired to write a blog entry about it. I mostly spent yesterday buying the domain name, upgrading my server, and getting the project to work on my “production” server. It wasn’t too difficult; I just needed to move the database, change some names, and make sure there weren’t any old names being used. I also started adding all of the cities on CraigsList to the database. At least, the US ones.
This took a lot of time to do manually. I had to figure out if the area was an actual city, or a bunch of cities, then figure out the geo coordinates, and stuff it into the database. I thought it might be faster to do it by hand than write a script. Nope.
Today I wrote a script that would make the entry faster by automagically getting the coordinates from Google Maps’ http request service. It still took a while, but today I finished inserting almost all of the US cities (excluding the combination ones, since Google can’t do those).
Now all that’s left is for me to make the pop up windows a little prettier, and maybe add a list of the CraigsList listings to the side for easy browsing by price, # of bedrooms, etc. That shouldn’t take too long. Then I can launch the site!
-
April 29, 2007
Craigslist and Google Maps Mashup Thingy: Day 11 – More Random Code
Today for the mashup thing, I did a bit of work on the main index page where each available city will show up as a marker. So when someone goes to the root of the website, they’ll see a bunch of cities. They can also pick the cities from a drop down menu, too. This required a bit of more javascript and some template files, etc.
I did a little research on the person who did the Google Maps Craigslist mashup like two years ago. Apparently he got a job at Google! While that’s pretty awesome, I can’t see this project doing the same for me, since it’s something that’s already been done (and two years ago, which is an eternity in web time). Rather, I’m just building this for my own use and perhaps for other people who wish there were more cities available in that HousingMaps mashup.
I came up with a name for the application. I was going to call it CraigsMaps, but someone already has that domain name. I’m thinking I should buy the domain name pretty soon, but what if I come up with a cooler name later!? The app should be ready in a couple of days anyway. Depending on how much extra stuff I want to cram in before I “launch” it.
-
April 28, 2007
Craigslist and Google Maps Mashup Thingy: Day 10 – Custom Controls and Housekeeping
I guess this should count as the project’s 10th and 11th day, though I didn’t really spend too much time on either day, so let’s just roll them into one. After doing some CSS to overlay some divs over the Google Map, I found out there’s another way to do this: with “custom controls.”
The way that the custom controls work is both pretty sweet, and not that great. I don’t like having to add content to them by using javascript. It just doesn’t seem “correct” to do so, since I’m just overlaying normal html. So I’ll be using some custom controls, and some divs. The good thing about custom controls is that the map knows not to open infowindows under them when they’re opened up.
Besides that, I just did a lot of random work on getting the app to look a little better. Like showing the correct area based on which city’s listing you want to see. Overall, the project is coming along really smoothly, with very few roadblocks. I’m happy that it’s nearing completion. I really enjoy doing these one-man projects, since it lets me get experience in everything from database schema planning and optimizing, to php backend development, to designing the css for the content, and even maybe a little tweaking in the Apache server. I think once I add this project to my “real” server, I’ll need to get a ram upgrade.
I think the project should probably be ready to go live within a week. I dunno if I’ll actually try to get the word out, or just release it and see if people find it via Google or something. That’d be cool. Since there’s already a site that does a similar thing (though there’s a smaller number of supported cities), I don’t think what I’m doing is really that noteworthy. I think it’d be useful, though, so we’ll see if there’s any reaction at all to it.
-
April 28, 2007
Punch Out on Wii Virtual Console!
I’ve never bought anything using Wii Points before since I don’t really like the idea of micro payments. I mean, Nintendo should give us free NES games just for having a Wii, right? Anyway, when I was on the Wii Store channel today, I noticed that Punch Out was on the VC!
Punch Out is one of those games that I can still enjoy playing, even after like 20 years! I can’t believe it’s that old! I can’t believe I’m that old! Anyway, I used my credit card to buy some Wii Points and downloaded Punch Out! This is the version with Mr Dream, not Mike Tyson… Speaking of changes, I was on Wikipedia like last week looking at Punch Out stuff (totally unrelated). Apparently “Soda Popinski” used to be called “Vodka Drunkenski” in the arcade version. How awesome is that!?
I got to Bald Bull before I actually lost. That dude is a bitch. I remembered how to defeat his bull charge, but let’s just say I was a little rusty. I finally beat him, but then I couldn’t beat Piston Honda in the next league or whatever. I’ll try again later. I remember that when I was a kid, that was also the part I gave up. I guess some things don’t change…
Also, the new Wiimote isn’t the best controller to play Punch Out on, but it sure as hell beats the original NES controller. I like to call that old controller “The Blister Machine!” Seriously, it hurt.
I hope they release Super Punch Out for the SNES for the virtual console soon. That game was really awesome, too. Back in the days where all SNES games were prefixed with the word “Super!”