Mapviewer - SH Customer Density Semi-Static Map

Card Puncher Data Processing

Mapviewer - SH Customer Density Semi-Static Map

Prerequisites

You must have the sh schema and the spatial demo files installed.

You can also do it with your own map : MapBuilder - Import of a Shapefile Map

Create the spatial data

As sys :

GRANT SELECT ANY TABLE TO MVDEMO;

As mvdemo :

create table t_sh_customer_density as (
select STATE_ABRV, 
(
select count(distinct T245.CUST_ID)
from 
     SH.COUNTRIES T175,
     SH.CUSTOMERS T186,
     SH.SALES T245
where  
  T175.COUNTRY_ID = T186.COUNTRY_ID 
  and T175.COUNTRY_NAME = 'United States of America' 
  and T186.CUST_ID = T245.CUST_ID
  and state_abrv = T186.CUST_STATE_PROVINCE
) CountCustomers, 
geom  
from
mvdemo.states
)
insert into USER_SDO_GEOM_METADATA values (
    'sh_customer_density', 
    'GEOM', 
        MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X', -180, 180, .00000005), 
                            MDSYS.SDO_DIM_ELEMENT('Y', -90, 90, .00000005)),
        8307);

create index t_sh_customer_density_SDX on t_sh_customer_density(GEOM)
indextype is mdsys.spatial_index;

Create the Bucket Style

Mapbuilder Sh Cust Density Advanced Style

Create the theme

Mapbuilder Theme Sh Cust Density Parameters

Mapbuilder Theme Sh Cust Density Style

Set the attributes of theme

With Oracle Maps, labels are manifest as tool-tips on mouse-over the feature on the map.

Mapviewer Theme Attributes

Preview of the theme

cx : -96.554346 cy : 38.987208 height : 42.081234

Theme Sh Cust Density Preview

Create the base map

Mapbuilder Sh Cust Density Map

Create the Map Tile Layer

Location :

  • In Map Builder / node Tile Layers
  • In MapViewer : Admin (Type the oc4j admin credentials) / Management / Manage Map Tile Layers / Create

Sh Cust Density Create Map Tile Layer

Zoom Level Definition :

Level Scale Tile width
0 1.5E8 91.71616894864779

To know more about how to define the zoom level : Point Center and Zoom Level Definition

Show the map in a web page

The tutorial is provided with the installation of MapViewer on this url :

<script language=javascript>
  function showMap()
  {	
    var baseURL  = "http://"+document.location.host+"/mapviewer";
    var mapCenterLon =  -96.554346;
    var mapCenterLat =  38.987208;
    var mapZoom      =  0;
    var mpoint = MVSdoGeometry.createPoint(mapCenterLon,mapCenterLat,8307);
    var mapview = new MVMapView(document.getElementById("map"), baseURL);
    mapview.addMapTileLayer(new MVMapTileLayer("mvdemo.SH_CUST_DENSITY_MAP")); 
    mapview.setCenter(mpoint); 
    mapview.setZoomLevel(mapZoom);    
    mapview.display();  			
  }
</script>

Support

See this article on how to retrieve debug information : Mapviewer debugging - log

interface not supported without a spatial index

You have forgotten to create the spatial index.

Message:Exception while querying theme: THEME_SH_CUST_DENSITY
Description: Nested exception is:
java.sql.SQLException: ORA-13226: interface not supported without a spatial index
ORA-06512: at "MDSYS.MD", line 1723
ORA-06512: at "MDSYS.MDERR", line 8
ORA-06512: at "MDSYS.SDO_3GL", line 1173





Discover More
Card Puncher Data Processing
MAPViewer

Mapviewer is a rendering software of spatial data stored in a Oracle database (Oracle Spatial). With MapViewer, you can start viewing your Oracle Spatial managed data. MapViewer is a component of Oracle...
Mapviewer Dynamic Map
Mapviewer - Creation of a dynamic Map (with Nsdp)

The purpose of this article is twice : to demonstrate the capability of the Oracle Map Javascript Api to use the Non Spatial Data in a Map to be able to integrate a Map with a Data Access Tool as...
Obiee Customer Population Report
OBIEE 10G - Integration of a Static Map with Mapviewer

This article talk a static integration of a map created with Mapviewer for OBIEE 10G. 11G has already this integration done for you. In this article, the NSDP library (non spatial data provider) is used...



Share this page:
Follow us:
Task Runner