Map Request Using Advanced Styles and Rendering Rules

3-12 Oracle Fusion Middleware Users Guide for Oracle MapViewer

3.1.11 Map Request Using Predefined Theme Binding Parameter and Custom Type

Example 3–12 requests a map using a predefined theme with a styling rule that selects all counties where a state abbreviation is in the selection list. When the predefined theme is created, the selection list is represented as a binding parameter, as follows: INSERT INTO user_sdo_themes VALUES COUNTIES_BY_STATES, null, COUNTIES, GEOM, styling_rules rule features style=C.COUNTIES state_abrv in select column_value from table:1 features label column=COUNTY style=T.CITY NAME 1 label rule styling_rules; This binding parameter can accept one or more values, for which you can create a custom SQL data type that represents this set of values, as follows: CREATE OR REPLACE TYPE string_array AS TABLE OF VARCHAR264; Then, you can use this custom data type on the binding parameter of the map request, as shown in Example 3–12 . Example 3–12 Map Request Using Predefined Theme Binding Parameter and Custom Type ?xml version=1.0 standalone=yes? map_request title=Binding Parameters and STRING_ARRAY type datasource = mvdemo width=640 height=480 bgcolor=a6cae0 antialiase=false format=PNG_STREAM themes theme name=COUNTIES_BY_STATES binding_parameters parameter value=FL,ME,CA,OH type=STRING_ARRAY binding_parameters theme themes map_request

3.1.12 Map Request Using Advanced Styles and Rendering Rules

Example 3–13 requests a map using the rendering element, and it combines two advanced styles that are based on different columns. In this example, an advanced style named POPVMK is based on column POP90, and another advanced style named EQRBRANK is based on column RANK90. Point features from the CITIES table are rendered. The shape of the feature is defined by the advanced style associated with column POP90, and the feature color is defined by the advanced style associated with column RANK90. Example 3–13 Map Request Using Advanced Styles and Rendering Rules ?xml version=1.0 standalone=yes? MapViewer Map Request XML API 3-13 map_request title=Cross advanced styles datasource=mvdemo width=640 height=480 bgcolor=a6caf0 antialiase=false format=PNG_STREAM center size=7.7 geoFeature geometricProperty typeName=center Point coordinates-72.96,41.25coordinates Point geometricProperty geoFeature center themes theme name=cities jdbc_query label_column=city spatial_column=location label_style=T.CITY NAME jdbc_srid=8265 datasource=mvdemo asis=falseselect location,city,pop90,rank90 from cities jdbc_query rendering style name=POPVMK value_columns=POP90 substyle name=EQRBRANK value_columns=RANK90 changes=FILL_ COLOR style rendering theme themes styles style name=STAR_TRANSP svg width=1in height=1in desc g class=marker style=stroke:000000;fill:FF0000;fill-opacity:0;width:15;height:15;font-family:D ialog;font-size:12;font-fill:FF0000 polyline points=138.0,123.0,161.0,198.0,100.0,152.0,38.0,198.0,61.0,123.0,0.0,76.0,76.0,76 .0,100.0,0.0,123.0,76.0,199.0,76.0 g svg style style name=POPVMK AdvancedStyle VariableMarkerStyle basemarker=STAR_TRANSP startsize=7 increment=5 Buckets RangedBucket seq=0 label=100217 - 1905803.75 low=100217 high=1905803.75 RangedBucket seq=1 label=1905803.75 - 3711390.5 low=1905803.75 high=3711390.5 3-14 Oracle Fusion Middleware Users Guide for Oracle MapViewer RangedBucket seq=2 label=3711390.5 - 5516977.25 low=3711390.5 high=5516977.25 RangedBucket seq=3 label=5516977.25 - 7322564 low=5516977.25 high=7322565 Buckets VariableMarkerStyle AdvancedStyle style style name=EQRBRANK AdvancedStyle BucketStyle Buckets low=1 high=196 nbuckets=4 styles=C.RED,C.RB13_1,C.RB13_ 6,C.SEQ6_01 BucketStyle AdvancedStyle style styles legend bgstyle=fill:ffffff;fill-opacity:50;stroke:ff0000 profile=SMALL position=SOUTH_EAST column entry text=Map Legend is_title=true entry text=POP90: entry style=POPVMK tab=1 entry text=RANK90: entry style=EQRBRANK tab=1 column legend map_request

3.1.13 Map Request Using Stacked Styles