1 / 43

<Insert Picture Here>

<Insert Picture Here>. 6 Mapviewer. Points couverts. Architecture Installation et configuration Définition de cartes MapBuilder La console Mapviewer Exemple d’utilisation Oracle Maps. MapViewer Architecture. Application. Client (browser, servlet, JSP, PL/SQL). Java API. XML/HTTP.

badrani
Download Presentation

<Insert Picture Here>

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. <Insert Picture Here> 6 Mapviewer

  2. Points couverts • Architecture • Installation et configuration • Définition de cartes • MapBuilder • La console Mapviewer • Exemple d’utilisation • Oracle Maps

  3. MapViewer Architecture Application Client (browser, servlet, JSP, PL/SQL) Java API XML/HTTP Oracle Application Server Map Rendering Engine JDBC Spatial Tables Map Definitions Mapbuilder Database

  4. Une requête spécifie: Le contenu de la carte Carte de base Thèmes Statiques Thèmes Dynamiques Formes Dynamiques La position de la carte Centre et taille Le format du résultat Type d'image Dimensions en pixels La réponse contient: L'image proprement dite Ou L' URL vers l'image ainsi que le MBR de la carte Formats: GIF, PNG, SVG, JPEG Requêtes et réponses Mapping Client MapViewer Oracle Spatial

  5. Contenu d'une installation MapViewer • La servlet Mapviewer • L'outil de définition de cartes • Des styles de base • Des exemples d'applications (JSP) • Une IHM d’administration (HTML) Mapbuilder Sample Java Server Page HTTP/XML Application Server JDBC Oracle Spatial Mapping Metadata MapViewer

  6. Installation de MapViewer • MapViewer n'est pas déployé automatiquement avec le serveur d'application • Le kit est fourni sous forme d'un fichier "EAR" (J2EE Enterprise Archive) standard: mapviewer.ear de 2.3 MB • Installation au moyen des outils de déploiement standard du serveur d'application. • Peut s'installer dans le moteur J2EE du serveur d'application (Oracle Components for J2EE - OC4J)

  7. Démarrage de Mapviewer • Automatiquement lors du démarrage du serveur d'application. java -jar oc4j.jar … 05/03/06 18:56:59 Oracle Containers for J2EE 10g (10.1.3.0.0) - Developer Preview 3 initialized … 05/03/06 18:56:55 Sun Mar 06 18:56:55 CET 2005 INFO [oracle.lbs.mapserver.oms, ,#Thread-9] *** Oracle MapViewer started. ***

  8. Définition des Cartes • Les définitions sont dans la base USER_SDO_MAPS USER_SDO_THEMES USER_SDO_STYLES • Définition au moyen de l'outil fourni (Mapbuilder) Map Metadata

  9. Définition des Cartes • STYLE • Couleurs, styles de lignes, symboles, textes • Style avancés pour thématiques • THEME • Associe un ou plusieurs styles avec une table spatiale • Style graphique, et style des étiquettes • Correspond à une couche dans la carte • MAP • Groupement de thèmes • Spécifie l'ordre des thèmes et leur visibilité selon l'échelle • Les cartes peuvent partager les thèmes

  10. USER_SDO_STYLES • Chaque style a un nom unique (par utilisateur) • Type de style: COLOR, MARKER, TEXT, LINE, ADVANCED • Définition codée en XML • Aussi formes géométriques et bitmaps (pour les symboles) • Quelques styles de base fournis dans l'installation de Mapviewer (fichier DefaultStyles.sql) SQL> describe user_sdo_styles Name Type ---------------------- ------------------ NAME VARCHAR2(32) TYPE VARCHAR2(32) DESCRIPTION VARCHAR2(4000) DEFINITION CLOB IMAGE BLOB GEOMETRY MDSYS.SDO_GEOMETRY

  11. USER_SDO_THEMES • Chaque thème a un nom unique (par utilisateur) • Un thème est associé à une table et une colonne géométrique • Règles de représentation en XML • Se réfèrent aux styles définis par leur nom SQL> describe user_sdo_themes Name Type ------------------ --------------- NAME VARCHAR2(32) DESCRIPTION VARCHAR2(4000) BASE_TABLE VARCHAR2(32) GEOMETRY_COLUMN VARCHAR2(2048) STYLING_RULES CLOB

  12. USER_SDO_MAPS • Chaque carte a un nom unique (par utilisateur) • Liste des thèmes utilisés • Codés en XML SQL> describe user_sdo_maps Name Type ------------------- ------------------- NAME VARCHAR2(32) DESCRIPTION VARCHAR2(4000) DEFINITION CLOB

  13. Utilisation de MapBuilder

  14. Styles

  15. Themes

  16. Cartes

  17. Console MapViewer

  18. Exemple d’utilisation de MapViewer

  19. Anatomie d'une requéte XML <?xml version="1.0" standalone="yes"?> <map_request datasource="spatial10g"basemap="US_BASE_MAP" format="PNG_STREAM" width="480" height="400"> <center size="12"> <geoFeature> <geometricProperty> <Point> <coordinates>-120.0,39.0</coordinates></Point> </geometricProperty> </geoFeature> </center> <themes> <theme name="PARKS.US_PARKS" /> <theme name="INTERSTATES.US_INTERSTATES" /> </themes> </map_request> Data source et carte Format du résultat Centre et taille de la carte Thémes additionnels

  20. Le résultat …

  21. Une requête en Java // Setup map request mv = new MapViewer(mapViewerURL); mv.setDataSourceName(dataSource); mv.setBaseMapName(baseMap); mv.setImageFormat(MapViewer.FORMAT_PNG_URL); mv.setDeviceSize(new Dimension(mapWidth, mapHeight)); mv.setCenterAndSize(cx, cy, mapSize); // Send map request mv.run(); // Get URL to generated Map imgURL = mv.getGeneratedMapImageURL(); // Get size and center of new map mapSize = mv.getSize(); Point2D center = mv.getCenter();

  22. MapViewer "AJAX" Architecture Application Client (browser) JavaScript Map API XML/HTTP Oracle Application Server Map Cache Server FOI Server Map Cache Map Rendering Engine JDBC Spatial Tables Map Definitions Mapbuilder Database

  23. <html> <head> <script language="Javascript" src="jslib/loadscript.js"></script> <script language=JavaScript> var baseURL = "http://"+document.location.host+"/mapviewer"; function display_map() { var mapview = new MapView(document.getElementById("map"), baseURL); mapview.addBaseMapLayer(new BaseMap("mvdemo.demo_map")); mapview.setCenter(-122.45, 37.75); mapview.setZoomLevel(5); var foiLayer = new ThemeBasedFOI ('customers', 'mvdemo.customers') ; mapview.addThemeBasedFOI (foiLayer); mapview.addNavigationPanel("east"); mapview.display(); } </script> </head> <body onload= JavaScript:display_map() > <h2>A Simple Web Mapping Application</h2> <div id="map" style="left:10; top:60;width: 600px; height: 500px"></div> </body></html> Oracle Maps client side: a simple HTML page showing a map Load the Oracle Maps client viewing lib map initialization function Invoke map initialization function where the map will appear on the page

More Related