[mapguide-internals] MapGuide Comments

Haris Kurtagic haris at sl-king.com
Tue Sep 11 18:07:21 EDT 2007

I am working on MapGuide RESTful service and digging deep into MapGuide.

I have a lot of good words on what Autodesk guys did, good job.


I would like to comment on things that I don't like or understand and
hopefully to hear other opinions.


1.       Legend Image Icon creation is very paintfull and error prone.

To request for Icon you need to send few parameters scale, theme rule
index, geometry type,...

What is happing is that viewer's are deciding on geometry type not on
feature source geometry type but reading from XML ( PointStyle,
LineStyle, Polygon, Combo ) by string tag.

Then they will convert it into geometry type (and wrongly for ComboStyle
- will go to Multi Point). Server rendering is expecting real geometry
type to find appropriate feature style (getting feature source and
correct geometry type would be even more overhead).


I see several problems: here viewers have hard-coded schema elements,
not correctly setting required geometry type, exception's on wrong
scale, exception if data on server is changed.

One of problems is if server can't figure out rule for example setting
incorrect scale will crash web-tier badly ( null-pointer access).

This can be repeated with Sheboygan example and if you send request for
District legend icon with scale=0, it will not find it and will return
null image and agent crashes ( HttpGetLegendImage needs if in 134 line
or throw exception in server).


What I think would be right is to have Id for rule so you would simple
request for image by id instead of ( scale, geometry type, rule index ).

I wrote a lot about not so "important" thing but it took us a lot of
time :)


2. Session - what are reasons for having session's ?

To store Map runtime parameters ( center, scale layers show/hide,
selection). Viewers are keeping this parameters of map and basically
doing two requests one to set these properties to runtime map and
another one to request image.

To store user credentials - session as token, that I think is  OK.

I am setting Map view parameters and request for image in one request,
good or bad ?


Thanks ,




More information about the mapguide-internals mailing list