Skip to Content

I never thought that a relatively simple idea, and implementation, would engender so much work after effectively being put in to production.  It caused me even more sleepless nights than my daughter. I’m talking about the We are the world to put the SDN world on a map.
What was going on? The first problem was that worldKit loaded the member point very slowly. And since people couldn’t see an immediate result they tended to submit their data repeatedly. So I needed to make some manual adjustments, with the risk that I was possibly overwriting data that was submitted during my intervention. Even after I’d fixed that problem by some fine tuning of the points loading, some people still continued to submit their data multiple times, even after my repeated remarks in the web log. So I put in additional warnings that appear in red when data is submitted. Even that didn’t seem to stop it from happening.
On top of that, it seemed that when different people gave the same location as being their residence, then only the latest entry was visible. The effect was that people thought that their original entry had been overwritten and resubmitted their data.
It wasn’t all doom and gloom though, I did have some warm and positive reactions. There were also tips for improvements and feature requests. I implemented the quick wins like the number of members registered.
The problem of the overlapping points intrigued me a lot. I’ve searched through the documentation without being able to find a solution. In some forums posts I found out that I wasn’t the only one with that problem. Since no solution was provided I mailed the author of worldKit directly, in order to found out if any progress had been made as regards this problem. Mikel Maron immediately (and most of all kindly) replied that this was indeed an issue that was still on the wish list. He advised me to put several people in one item. It isn’t such a bad idea, as such, but it entails more manual work, since it all resides in a flat XML file and maintaining this via a program would not be an efficient solution. The major drawback of this method was the fact that one could only link one Business Card to an item, which meant some trifling work with external links that would sum up all items with their own BC. Again, nothing that would be efficient enough.

Time for some change
So I needed to look for another solution. Valery had already mentioned Google Maps as a better option for the details which are non-existent in the worldKit implementation. So I started looking over there and from the very first moment I spotted a problem. Google maps don’t support GeoRSS, and the data that had already been collected was written in a flat file in that specific format. There was a hack though, written by Mikel Maron. Yes indeed, it’s the guy from worldKit. This extension would have been perfect if Google officially supported it. However, there was a risk that this wouldn’t be the case and that Google might choose another method, since the Mikel’s method required an extra proxy, due to security restriction of the browser.
Accordingly I now investigated Yahoo! Maps, which does support GeoRSS. It worked fine with a minimal amount of extra code. My joy was rather short lived though, since I spotted the same difficulty here as with worldKit. Identical locations are shown as one point, with a slightly thicker shadow. Yahoo! Maps are more detailed, although zooming in wouldn’t make much difference since it still remained a single spot. Back to the drawing-board. After spending a whole weekend trying out different things, like manually adding minor differences to the geocodes of those identical locations, I still hadn’t obtained any satisfactory results.
There was a ray of hope though. I did find an interesting map that could be the solution to my problem. This map had a legend. That meant that I could list all the members without hiding members with identical locations. It looks like a never ending story, but this solution also has its drawbacks. First of all, it’s not mine, thus I don’t have its functions, logo’s, advertisements and other layout related issues under my control. Secondly, it was made with Google. I didn’t want to change again since I had already invested much time in research on the Yahoo! version.

End of the tunnel
There was no need to despair though, since Yahoo kind of “supported” legend too, as long as one codes it by one’s self. This sneaker shop map was the best proof of this. There is one slight problem: it doesn’t work with GeoRSS. I had enough of all this and decided to leave the format and put everything in a database, in this case a small MySQL table. As a consequence a one-time manual conversion was required, but that’s peanuts compared to the effort I’d already put in. And I still didn’t have anything that worked.
I will spare you the rest of the problems – including the fact that my provider changed machinery and forgot to compile an essential element for the solution that I had in mind – and will show you some code instead. This is a developer’s network after all, isn’t it? Despite the huge interest in scripting these days, I won’t show you the rather workaday PHP (which took me a while, since I’m not a PHP expert :-() but rather the Yahoo! maps code. Many thanks to Valery Silaev for streamlining things.

 

For the map itself:
Create a map

var map = new YMap(document.getElementById('mapContainer'));
 

Determine a centre point

var myPoint = new YGeoPoint(30,10);
 

Zoom and centre the map

map.drawZoomAndCenter(myPoint, 16);
 

Add the Hybrid, Map and Sat Control

map.addTypeControl();
 

Add the slider zoom control

map.addZoomLong();
 

For putting the markers on the map:
Create a geopoint

var geopoint = new YGeoPoint(lat,lon);
 

Create the marker

var marker = new YMarker(geopoint);
 

Add the label to the marker (in this case the alphabetical place of the member)

marker.addLabel(num);
 

Define the mouseover. It’ll show the name, country and BC, put in the balloon variable earlier.

marker.addAutoExpand(balloon);
 

Put it on the map

map.addOverlay(marker);

 

For the Legend:
Open the balloon for that specific marker for the mouseover.

        marker.openSmartWindow(markers[num]['balloon']);

It needs to be closed after the mouseover.

        marker.closeSmartWindow(markers[num]['balloon']);
 

Conclusion
As you can see, things didn’t go as smoothly as they should have done. Despite all the hype, mapping software are still scarcely out of the egg, poorly documented and let one down when one wants to try the more advanced, and in my opinion, more obvious things. It took me a lot of effort to achieve this rather simple solution. I hope that this will encourage an even greater response and that you add your data to the SDN world map. For the moment, only 8.36% (67 to be exact) of the 798 readers of my We are the world web log have done this. The rest remain in hiding. No, I won’t start nagging about the involvement of the SDN community, but it’s still a long road ahead in order to prove to Freddy that we are 400K strong. Even the 4% participation rate, as mentioned by Mark Wipro passed 100K SDN Points. Congratulations., means a possible 16 000 people that could enter their data. So Brother and Sisters, Where Art Thou? Put yourself on the map!

Update: Version 3 of SDN World has been map released

To report this post you need to login first.

13 Comments

You must be Logged on to comment or reply to a post.

    1. Alvaro Tejada Galindo
      Great work Eddy! I look better and works faster! -:D But actually…It makes me feel lonely…Am I the only SDN user on South America??? I deserved a prize don’t I??? hehehe…

      Greetings,

      Blag.

      (0) 
  1. Mark Finnern
    Hi Eddy,

    Wow, how much effort you put into this. Thanks.

    It is not your fault, but somehow when they map the zip code 94304 which is Palo Alto it shows up as somewhere south of San Jose, almost in the garlic fields of Gilroy.

    So I added one entry for my home zip 94401 which is in San Mateo and this one worked better. (Only now there are two Mark Finnern entries. Sorry. It’s the reason why I will not try my old San Francisco zip: 94110.

    For sure I love these dots all over the world. Makes you realize the reach that we are having with our words.

    Thanks, Mark.

    (0) 
  2. Peter Inotai
    Hi Eddy,

    Thanks a lot, it’s really great, it looks better now.

    I found the followings strange:
    – With IE 6, the SDN banner is partially hidden by the map, however it looks OK with Firefox
    – Member list is partially overwritten/hidden by the input fields /both with IE and FF/

    Cheers,
    Peter

    (0) 
    1. Eddy De Clercq Post author
      Peter,

      I’ve been tweaking it a bit. Due to the size of the map, it still might not be OK if you use a small screen resolution though.

      Eddy

      (0) 
      1. Peter Inotai
        Hi Eddy,

        Thanks for your fix. The user list is OK now, the SDN banner is still hidden in IE6.
        Probable it’s related the screen resolution, as I have only 1024*768 /Max resolution on my company laptop:-(/

        Peter

        (0) 
  3. Jürgen Mayer
    Hi Eddy,

    great job, but I didn’t manage to add myself with the city Schwaebisch Gmuend (nor Schwäbisch Gmünd). So myself is now located in Stuttgart because this worked (even it’s not totally correct).

    Any idea?

    Regards
    Juergen Mayer

    (0) 
    1. Eddy De Clercq Post author
      Hi,

      It seems that I wasn’t able to determine the geocodes for The Oldest Staufer Town. I used another manual geocoder and I’ve updated your data.

      Eddy

      (0) 
  4. Anton Wenzelhuemer
    Freddy,

    seems you can still invite the whole SDN community into your tree house in Eddy’s backyard to join you watching tommorrow’s football games.

    eeek,
    anton

    (0) 
  5. Matthias Zeller
    Looks very good! I just signed up…. Bummer I was the 101st person to sign up 😉
    The map itself is nice but hard to navigate (e.g. zooming). Have you looked at the new Yahoo! Maps Beta? http://maps.yahoo.com/beta/
    The user interface has significantly improved.

    Cheers!

    Matthias

    (0) 
    1. Eddy De Clercq Post author
      Matthias,

      Everything is sorted by name ir order that people can find themselve back. You’re actually nr 64. The numbering is only for making a visual link between markers and list.
      I’ve seen indeed the beta. As soon as the beta is final, we will certainly use that.
      The pan/zoom control is a typical Flash implementation and we’re using the AJAX implementation. I’ve added the panning control.

      Eddy

      (0) 

Leave a Reply