Archive for April, 2007
Getting it to work.
I’m finally getting somewhere with the Yahoo/Flash map. The latest is always viewable at http://chnm.gmu.edu/1989/maps/yahoo.html. Tonight I worked on getting the title and description to show up nice. The description is usually really long, so I found a php function that truncates it (without cutting of mid-word), and adds an elipse to show more text. I also figured out how to add html links to the xml data. There’s apparently a couple of different ways. I opted to have the first < in the a tag be written in as
. That did the trick. Now the marker has a link to see the whole of the data. This should be a link back to the page that’s part of the real site (in Omeka).
Another idea: Add the ability in the admin side of things, to select an item, and then enter the geocodes for that item by clicking on the map in the appropriate spot. Flickr does something like that. It would make it really easy for admins to enter the geocodes.
The Continuing Saga of Map Making
So, I’ve decided to use the yahoo/flash option because it looks better, and it’s a bit easier to implement. The biggest impediment is not having geocodes for each item in the database. Here are some steps that must be taken before the map can work.
- The database needs to add a longitude and latitude field for items.
- Each item then needs their long/lat entered in.
- After that happens use the commented code below in the xml.php file:
- //$sql = “SELECT item_title, item_description, item_longlat FROM items ORDER BY item_date”;
There’s a couple of options for the field names and what they contain. This is, of course, all to be determined by the Omeka makers, and not me, but here’s my take on it anyway.
- item_longlat = would hold the longitude and latitude in format lon,lat
- item_long & item_lat = hold the long and lat separately, that might be cool for searching on items that are on the same long or lat.
- item_geocode = same as item_longlat, but a different name.
As for the Flash introduction, I still need to get the list of events that should be displayed. I also played with creating a new flash intro based on the new yahoo map of Europe, and the style of the markers. I’ll also need to think of a way to deal with markers whose information would tend to go off screen. I’ll have to make them ’stage’ aware, or place them individually.
The last item is creating a map, that, when a country is clicked on, will return all of the items from that country. A couple of options on that are to have it return a yahoo map with markers showing items from that country, or to just return a normal list.
I think I’ll Yahoo!
I did some more researching and playing around with the Yahoo and Flash options and I think this will be the better way. As an example of why, look at Justin Everett-Church’s work creating custom ‘themes’ for the maps.
Also in my search I came across some neato projects Trippermap plots your flickr photos on a map that you can host or plug into your own web page.
Plazes.com if for those of you who like to let everyone know where you are at any moment of the day. A bit too much of an information overload for me, but there’s 6 billion people in this world, so there’s bound to be a few thousand that get hooked by this idea.
Of course Flickr’s own map deal would be the ideal set up for this project. I’ll get some of the functionality, but it would be awesome to get something like this going.
I’ll be back with more results…
To Google, or not to Google. That is the question.
So, I am now in the stage where I decide how to plot the objects from the database onto a map. The question becomes, which map technology do I use. There are several options.
- Google Map, using the Google Map API.
- Yahoo! Maps, using the Yahoo! Maps API
- Build the map in Flash.
- Some form of GIS map.
The first two are relatively easy to accomplish. I just need to pull the info from the database (the longitude and latitude if available, or at least the city and country), make an xml file from that. Have the map page read that xml file for plotting and displaying. The issues with these two methods are getting them to properly display in all browsers, and figuring out how to work the API’s to get the map to look like I want it to.
The third option (Flash) will be much more difficult. It would be really easy to make the map look like I want, but I’m not sure how the plotting of the points would work. I would think each object would have to be identified with a certain point on the Flash movie stage. I don’t know how to be able to use the longitude and latitude to place the objects in the right place on the map. I actually just did a quick search and found this article which might swing the tide to a ‘mashup’ of both 2 and 3, Yahoo! and Flash.
The last option is to use a form of GIS map. While these can generate some pretty cool looking maps, it is mostly due to geographical data compiled by others (elevation, population density, political boundaries, etc). It would require learning a whole new set of tools, programs and technology.
I’m going to try the Yahoo! and Flash setup and see if that will do what I need it to.
Phase 2 - plot the objects on a map
I started thinking and researching for phase 2 of the internship tonight. Plotting all of the objects that a student selects as their “My Favorites” on a map. There seems to be a number of options available, and the most usable seems to be a combination of yahoo maps and flash.
A quick search of the Internets pulled up this page from one of the makers of PHP. Rasmus’ Toys Page has a great writeup on how to mash yahoo maps, flash and GeoCodes into a neato map. What I like best about this (besides the flashy eye-candy - pun intended) is the ability this set up has to automatically grab the longitude and latitude from as little as the city and state. I’m not sure how well it will work for places outside of the US, but theoretically all of the objects in the database will have their GeoCodes as part of their metadata.
Oh, and since I haven’t done a snapshot of the progress on the Flash movie, here’s the latest. Each of the targets are clickable, so you can have a better chance to see the text in the bubble. I should have put a version from between this and the one before… but I was working feverishly to make it look good. I’ve spent way too much time trying to make it look good. I desperately need some design skills.