Tuesday, February 12, 2008

Flash-y Map-plication vs. 500 marker limit

I've been pushing capabilities of javascript mapping frameworks. There's a real limit on the number of markers a browser can display without getting bogged down. 500 is a good limit, and that's probably too high for internet explorer. You can put as many markers as you like via WMS tiles. You can even take map clicks, send them back as AJAX queries and open an info window. I recently helped my friend do this, and we have a pretty snappy map displaying 5,000+ clickable "markers" no problem. It's actually not markers, just tiles, but it works quite well:
That's a snapshot of the google maps application, with an info window that appears when a marker is clicked. It sends a GetFeatureInfo request back to a mapserver WMS.

Vector drawing in the browser is limited. The amazing efforts of the OpenLayers, featureserver projects make this difficult to assert, as they abstract away all of the browser incompatibilities and give a nice platform to do real vector editing in a map. Still, there's a limit, and even if browsers become twice as fast in the next 2-3 years (and that's a big if, because the slowest commonly used browser will be the weakest link), the limit will be at 1000 markers.
Flash is built to do vector drawing. It's cross-browser. I've got my toes wet with a flash-based project and now that I am passed (part of) the learning curve, I figured I'd see what's available for GIS applications in flash...

Yahoo fairly recently released their Actionscript 3.0 version of their maps API. The examples look very straight-forward, if a bit heavy on the under-scores--even for a pythonista. But it's not open source, and there is no indication on how one would request tiles from any source--say WMS.
There is a 3D earth viewer with a nice javascript API, but it's not open source and I dont need the 3D stuff.

I'm still looking at worldkit, and even provided a patch to allow it to compile with mtasc. The worldkit approach as I understand it is to just provide the functionality in the flash movie, and only offer customization through an inutitive config.xml file, so no actionscript programming is necessary. Of course, this isn't strictly the case, but I think it's the way that it's most used. It's licensed GPL...

Then there's modest maps who are truly open source, with a trac bug tracker and BSD licensed code, multiple developers, clean design, and libraries for both actionscript 2.0 and 3.0. And they can display imagery from any of the major providers, I don't quite understand how they get by without violating the licensing restrictions, but they are making javascript calls--presumably to get the copyright info associated with the region of interest. They have a coordinate conversion system that seems very clean, though I also dont understand how to relate it to proj4 definitions--or the EPSG code in a WMS request. If I can understand how to use this, and even if it's possible to have layers that overlay base imagery I'd go with modest maps.

Anyone know of any others? I guess my criteria are:
  1. Active, currently developed
  2. Open source
  3. WMS friendly

EDIT:
I was able to get a modestmaps actionscript 2.0 movie to show 2500 markers, with the map still very responsive. The as3 version should perform even better because a marker can be a subclass of the more lightweight Sprite, rather than the full movieclip.
this is a shot of the randomly placed markers.

7 comments:

Michal Migurski said...

Hi,

The short answer about the Modest Maps coordinate system is that it's a way to bridge a projection like you'd get from proj and the pixel positions of tiles on the screen, including zoom level. All the major map providers use the same vanilla Mercator projection, but it's very possible to use something else.

Feel free to ping me about it; mail mike-hackmap@teczno.com and watch the SpamArrest "are you a human?" response.

Michal Migurski said...

Trying to post a comment, is this thing on?

brent said...

thanks mike, i will ping you!

brent said...

michal rather.

Ken-ichi said...

Hey Brent, great to see you're blogging! Do you have a link for that first workaround you described, where you simulated markers with raster overlays and fetching infowindow contents from a server using click coordinates?

brent said...

hi ken-ichi,
unfortunately, that application is at a password protected site.
you can check here
then you'd do somethign like:

GEvent.addListener(map,"click", function(overlay,point) {
if(!point){ return; }
map.getFeatureInfo(point, wmslayer, function(html){ alert(html)});
});

where [html] is whatever (presumably) mapserver returns from you getfeatureinfo request.

aircraft support said...

black mold exposureblack mold symptoms of exposurewrought iron garden gatesiron garden gates find them herefine thin hair hairstylessearch hair styles for fine thin hairnight vision binocularsbuy night vision binocularslipitor reactionslipitor allergic reactionsluxury beach resort in the philippines

afordable beach resorts in the philippineshomeopathy for eczema.baby eczema.save big with great mineral makeup bargainsmineral makeup wholesalersprodam iphone Apple prodam iphone prahacect iphone manualmanual for P 168 iphonefero 52 binocularsnight vision Fero 52 binocularsThe best night vision binoculars here

night vision binoculars bargainsfree photo albums computer programsfree software to make photo albumsfree tax formsprintable tax forms for free craftmatic air bedcraftmatic air bed adjustable info hereboyd air bedboyd night air bed lowest pricefind air beds in wisconsinbest air beds in wisconsincloud air beds

best cloud inflatable air bedssealy air beds portableportables air bedsrv luggage racksaluminum made rv luggage racksair bed raisedbest form raised air bedsaircraft support equipmentsbest support equipments for aircraftsbed air informercialsbest informercials bed airmattress sized air beds

bestair bed mattress antique doorknobsantique doorknob identification tipsdvd player troubleshootingtroubleshooting with the dvd playerflat panel television lcd vs plasmaflat panel lcd television versus plasma pic the bestThe causes of economic recessionwhat are the causes of economic recessionadjustable bed air foam The best bed air foam

hoof prints antique equestrian printsantique hoof prints equestrian printsBuy air bedadjustablebuy the best adjustable air bedsair beds canadian storesCanadian stores for air beds

migraine causemigraine treatments floridaflorida headache clinicdrying dessicantair drying dessicantdessicant air dryerpediatric asthmaasthma specialistasthma children specialistcarpet cleaning dallas txcarpet cleaners dallascarpet cleaning dallas

vero beach vacationvero beach vacationsbeach vacation homes veroms beach vacationsms beach vacationms beach condosmaui beach vacationmaui beach vacationsmaui beach clubbeach vacationsyour beach vacationscheap beach vacations

bob hairstylebob haircutsbob layeredpob hairstylebobbedclassic bobCare for Curly HairTips for Curly Haircurly hair12r 22.5 best pricetires truck bustires 12r 22.5