1. 创建表和数据
在HR Schema中创建表WAREHOUSES
CREATE TABLE "HR"."WAREHOUSES"
( "ID" NUMBER(4,0),
"NAME" VARCHAR2(20 BYTE) NOT NULL ENABLE,
"STREET" VARCHAR2(20 BYTE),
"CITY" VARCHAR2(20 BYTE),
"ZIP" NUMBER(5,0),
"STATE" VARCHAR2(2 BYTE),
"MANAGER" VARCHAR2(30 BYTE),
"LAST_STOCKED" DATE,
"TOTAL_SPACE" NUMBER(5,0),
"LONGTITUDE" NUMBER(10,6),
"LATITUDE" NUMBER(10,6),
PRIMARY KEY ("ID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "USERS" ENABLE
) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "USERS" ;
执行如下SQL语句,插入数据:
INSERT INTO WAREHOUSES VALUES(1,'Foster City Central','109 Beach Park Blvd','Foster City',94404,'CA','John Davis','08-SEP-10',2800,-122.279,37.549);
INSERT INTO WAREHOUSES VALUES(2,'Redwood City Central','175 Poplar Av','Redwood City',94061,'CA','Marky Marck','15-APR-10',3400,-122.224,37.475);
INSERT INTO WAREHOUSES VALUES(3,'Redwood Storage','678 Emerald Hill Rd','Redwood City',94063,'CA','Joan D Ark','15-APR-10',1200,-122.256,37.458);
COMMIT;
2. 使用ADF BC创建基于WAREHOUSES的EO和VO
3. 拖放DataControl中的WarehouseView1生成Map
(1)选择Geographic Map-->Map and Point Theme...
(2)新建Map Configuration
(3)设置地图服务提供商:Map Viewer URL:比如http://elocation.oracle.com/mapviewer。
(4)设置能够把街道地址转换为经纬度的服务提供商:Geocoder URL 比如http://elocation.oracle.com/geocoder/gcserver。
(5)设置完成
(6)预览
(7)坐标定位到美国
(8)与模型参数绑定
(9)拖放地图工具条
(10)设置AutoZoomThemeId,该值为mapPointTheme的id值,这里是mt1。
这样设置后,地图会自动缩放显示以mapPointTheme的数据为中心的地图。
Project 下载:ADF_Map.7z
没有评论:
发表评论