Changes between Initial Version and Version 1 of maestro/UserGuides/VectorLayerEditor


Ignore:
Timestamp:
02/24/09 09:16:00 (16 years ago)
Author:
ksgeograf
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • maestro/UserGuides/VectorLayerEditor

    v1 v1  
     1== !MapGuide Maestro User Guides ==
     2This page contains instructions for [wiki:maestro MapGuide Maestro] usage.
     3
     4== Creating a new layer ==
     5To create a new layer, simply click on the "Add" button and select "Layer".
     6
     7You should new see the following dialog:[[BR]]
     8[[Image(http://trac.osgeo.org/mapguide/browser/trunk/Tools/Maestro/Screenshots/Userguide/EmptyLayer.png?format=raw)]]
     9
     10Now browse to an existing !FeatureSource. Since this page is about vector data, make sure you don't select a raster layer. Once you have selected a !FeatureSource, your display should look like this:[[BR]]
     11[[Image(http://trac.osgeo.org/mapguide/browser/trunk/Tools/Maestro/Screenshots/Userguide/LayerStartup.png?format=raw)]]
     12
     13=== Resource Settings ===
     14In the section of the layer editor titled "Resource Settings", you can select the basic properties of the layer. The "Schema" is the list of avalible tables or files from the !FeatureSource. File based data usually only has one entry here.
     15
     16The "Geometry" entry is the column where geometric data is stored. For ODBC this may be a fictional column that hides a pair of X,Y columns. Most data sources have only one entry per table.
     17
     18If this layer should only display some of the data in the table, you can insert a "Filter". A filter is an SQL expression in FDO format. To use this field, you must have some knowledge of the SQL language. A description of SQL is outside of the scope of this guide, but the [http://www.w3schools.com/sql/default.asp w3schools intro] may help you out. Once you get a grasp of SQL, the "Filter" is actually the "WHERE" clause in an SQL statement.
     19
     20For this simple guide, you can try something like:
     21{{{
     22ID > 100
     23}}}
     24This will hide all items where the value of the ID column is less than 100.
     25If you click the "..." button at the end, you will see an incomplete editor that basically gives you a bigger text area to type in.
     26
     27A feature in MapGuide can also have a link. If the user pauses the mouse over a feature with a link, they will recieve a message that indicates they can open the link. If you type in a string like:
     28{{{
     29"http://osgeo.mapguide.org/"
     30}}}
     31all features will point to the same page.
     32If you type in the name of a column, then that columns value will be used as the link. You can build more complex links by using the + operator:
     33{{{
     34'URL' + "?ID=" + 'ID'
     35}}}
     36If a feature has the values: URL = "http://osgeo.mapguide.org" and ID = "7", the link becomes "http://osgeo.mapguide.org?ID=7". A slightly more robust but less obvious way is to use the "concat" function:
     37{{{
     38CONCAT(CONCAT('URL', "?ID="), 'ID')
     39}}}
     40The two statements produce the same results, but the latter is required for some providers. If you click the "..." button at the end, you will see an incomplete editor that basically gives you a bigger text area to type in.
     41
     42The "Tooltip" field is subject to the same rules as the "Link" field, but will result in a tooltip the user can see. You may build a html fragment rather than a simple string. Such a html fragment can include an image like this:
     43{{{
     44"<b>Preview:</b><br/><img src='http://mapguide.osgeo.org/sites/all/themes/osgeo/logo.png?ID=" + 'ID' + "' />"
     45}}}
     46
     47Once again, these examples require knowledge of both html and SQL. Further information about these enormous topics can be found in books or by searching the internet.
     48
     49=== Properties avalible in the viewer ===
     50If it is possible to select features in your map (you may not be decided on this point yet), it is also possible that you want to display some of the data that is associated with the feature. This section of the editor lets you choose what columns are avalible, as well as the title of the column should be for the user. You can safely skip this section and move on if you don't know what to do with it.
     51
     52=== Layer style ===
     53This section is where you actually decide how your data should be displayed.
     54Maps are special because they show many informations at the same time. A typical map will start out with some form of overview of the area, and then as the user zooms in, the map becomes more and more detailed. If one tries to display all buildings in an overview of USA, it will most likely not make a usefull map. For this reason a layer has scale ranges.
     55
     56A scale range defines what the layer should look like at a certain zoom level. A common use of scale ranges is to hide a layer, eg. buildings, until the user has zoomed far enough in. Another use would be to adjust the line thickness to make it more or less intrusive at certain intervals. If the layer should be visible and look the same all the time, the interval would be set like this: min = 0 to max = infinite.
     57
     58The core layer editor looks like this:[[BR]]
     59[[Image(http://trac.osgeo.org/mapguide/browser/trunk/Tools/Maestro/Screenshots/Userguide/layerEditorScales.png?format=raw)]]
     60
     61The three buttons at the top can be used to add a new blank scale range, delete a scale range, and insert a copy of the currently selected scale range. The fourth last button can be used to make the editor fill the entire screen.
     62
     63Inside each scale range, it is possible to select apperance information for each of the three basic geometry types: points, lines and polygons. The checkbox enables you to completely hide a specific geometry type, which is usefull if your data does not contain any geometries of a specific type. If none of the boxes are checked, no geometries will be visible in the given scale range.
     64
     65For each of the basic geometries, there must be at least one rule. Each rule can be assigned an expression that explains what features the rule applies to. If you create a rule with the expression "PropertyValue > 10000000" and a rule with no expression, all objects that have a propertyvalue greater than 10 million, will look like the style for the first rule dictates, and all others will look as the second rule dictates. If you remove the second rule, only items matching the first rule will be displayed. If a feature matches multiple rules, the first rule is applied.
     66
     67A common use of rules, is to create a theme, where objects are color coded according to a value, eg. parcels color code by property value.
     68
     69The "Theme" button is not created yet, but once done, it will be able to create gradient color set. If you want to help out, you can implement such a dialog and submit it to the Maestro project.
     70
     71The label field allows you to enter a label that is displayed for the features. You can enter expressions format labels, using data from the feature.
     72
     73The label style field can be used to change properties for the label, such as font, color and size. Double click the field, or click the browse button to bring up the label style editor.
     74
     75The object style field is where you choose how the feature is displayed on the map. Double click the field or click the browse button to bring up feature editor. The editor is looks a little different for the point, line and area styles, but all contains properties such as color, line width, fill style.
     76
     77----
     78If you have raster data, you can read the following page:
     79 * '''[wiki:maestro/UserGuides/RasterFeatureSource Using raster data]'''