- The live address of the CJMAP application was http://www.dntcj.ro/cjmap.
- It was created by Attila Levente EGYEDI in 1999, and is presented here for historical reasons.
- The original needed the Adobe Flash and Oracle Java plugins. Neither exists in a browser any more — so this version needs nothing.
Why it took two languages
In 1999 no single browser technology could draw a vector city map and pan, zoom and search it. So the map used two, and neither one could do the other's job.
Macromedia Flash 4
Could draw vectors beautifully and scale them smoothly — a whole city in 87 KB.
Could not think. ActionScript at that point was
gotoAndPlay, tellTarget and a handful of
fscommands. No arrays worth the name, no string
handling, no way to load a data file.
A Java applet
Could think. Load a 737-entry street index over HTTP, run a search, track a viewport, drive an interface.
Could not draw. Rendering a smooth, scalable vector map in AWT 1.1 was not going to happen.
The fix was to let each do only what it was good at, and to pass messages between them through the one thing both could reach — JavaScript in the hosting page.
zoom3 applet ──JSObject.eval()──▶ operate.js ──SetZoomRect──▶ map.swf owns the state translates draws
The entire contract between the two runtimes is four numbers and a bitfield. The applet worked out which rectangle of the city should be on screen and said so; the movie zoomed to it and asked no questions.
// Java: viewport centre and size, plus which layers are lit win.eval("ShowPlace(" + x + "," + y + "," + dx + "," + dy + "," + opt + ")"); // JavaScript: stage pixels become twips, 1px = 20 mm.SetZoomRect(x*20, y*20, (x+dx)*20, (y+dy)*20);
The control panel
There is no layout manager here and no widget toolkit doing the work. The applet painted itself over a background photograph and did its own hit-testing in arithmetic: a city thumbnail with a draggable viewport rectangle, a zoom bar running green to olive, a compass rose lettered N E S V — Vest, in Romanian — and six buttons blitted from a sprite sheet.
Two of those buttons opened real operating-system windows floating outside the browser, which is a thing applets could do and nothing since can. A third, Photos, was greyed out. It was never implemented, and it is still greyed out here.
The rebuilt panel keeps the same furniture in the same order, and takes its colours from this image.
What the rebuild found
Nothing here was redrawn. A parser reads map.swf byte by
byte and re-emits its shape records as SVG paths, so every street is the
same curve the 1999 file described. Three things came back that were not
expected.
The diacritics the search had lost
The street index shipped as flat ASCII — Fat Frumos,
Scolii, Piata Abator. The labels drawn on the map did not.
Flash 4 predates Unicode, so its font tables store raw codepage
bytes, and the only clue as to which codepage is the font's
name: one font is Times New Roman CE, which is
CP1250, and one is plain Times New Roman, which is CP1252.
Reading each correctly restores the spelling on
340 street names.
Fat Frumos → Făt Frumos · Scolii → Şcolii · Jean Jaurcs → Jean Jaurès
The character set spans both languages of the city — ăâîşţ for Romanian and áéóöő for Hungarian — which is why Zrinyi Miklós, József Attila and Mikszáth Kálmán all come back intact.
A city renaming itself
Fourteen entries in the index carry two names. They were written by hand, as it happened, in three different notations that all mean exactly what they say in Romanian — acum is "now", f. is fost, "former". The map settles which half was current, because it prints the pair as New (Old).
| Grigore Ignat acum Colectivistilor | → | Colectiviştilor (Grigore Ignat) |
| Octavian Goga acum Jozsa Bela | → | Józsa Béla (Octavian Goga) |
| Karl Marx (f. Decebal) | → | Karl Marx (Decebal) |
Both names are searchable. Typing Decebal finds the street that stopped being called that.
A spelling reform, in the way
One street refused to match anything: the index says Tirnavelor, the map says Târnavelor. That is Romania's 1993 reform swapping î for â — the same street and the same sound, but stripping the accents sends the two spellings to different letters. It needed a rule of its own.
1999 or today
Two decisions could go either way, so the map does both and lets you choose with a switch in the panel.
Spelling. CP1250 writes Romanian with a cedilla under s and t. Unicode later gave the language its own comma-below letters, and the cedilla forms are now considered wrong for it. 1999 mode keeps what the file actually says; today mode corrects it.
Labels. Flash scaled the lettering with the artwork, so at full extent all 727 labels are a few pixels tall and unreadable. Today mode holds them at a legible size instead — which means showing fewer of them, thinned by the movie's own three-tier type hierarchy, the largest tier being the 44 major boulevards.