You can load/save the LayerDefinition Xml from the server, using GetResource/SetResource. You must load the layer, "theme" it, and save it back (possibly into the session repository). If you save the map into the session repository, you must also update the map, but using
the runtime map (ea., using MgMap.Open(...)).

Using theming, you can assign different colors to each object, for instance based on their id. If you are not used to theming, consider it a set of ordered rules, that determine how
the object is rendered.

You should try to create a layer, and theme it, using Studio (not sure WebStudio supports it). Once created, use the "Save as Xml..." or the GetResource call to get an example of
how the theming is constructed within the Xml.

Regards, Kenneth, GEOGRAF A/S


A H skrev:
hello, i'm new here.

i'm using MGOS 1.1 on ASP.net. i'm trying to build an AVL system that shows
vehicle positions and its tracks (line). currently i managed to display one
unit with it tracks, using the Sheboygan address and parcel samples.

the problem is to display more than one unit of vehicle, and each have
different color codes and degree of rotation (the symbol's rotation). afaik
the layer definitions will stay after we created it? can i plot more than
one unit with different color and rotation on the same layer?

my steps to create the layer now:

- create class definition
- create feature schema
- create feature source

- load a XML templ for the content
- create the layer

- insert command to update feature (with coordinates, names etc.)
- display layer

i tried to provide color during the insert command. is it possible?

if not, do i have to create different layers for each units?
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to