Polygons in MapViewer using JavaAPI

How do I display polygons in MapViewer using the JavaAPI?

Hi Randy,
assuming you have a table with a geometry column and valid polygons:
1) the table must be registered on user_sdo_geom_metadata
2) a spatial index must be created on the geometry column
3) with MapViewer API you can add a dynamic theme using the addJDBCTheme method, and then call the method run to generate your map image.
Take a look on MapViewer documentation for more information and examples.
Joao

Similar Messages

  • How to add a polygon to mapviewer using Javascript API

    Hi,
    I am using JavaScript API for the MapViewer.
    Using redlining tool, my application allows user to draw polygon onto the map.
    I would like to have union, difference and intersect tools. I know the back end logic can be done using using JTS or SDO_Union, SDO_difference, and SDO_intersection. but how do i display the result polygon on the map? Note that I am not going to store the polygon in the database.
    Thanks for any ideas.

    Hi,
    If I understand well you are using Oracle Maps. User do some redlining, then you somehow makes FOI polygons. Then you get the coordinates of the polygons and send them to the back-end where you can use spatial functions and get the coordinates of the new polygon.
    You can store those coordinates in i.e. hidden input field on page (if you use JSF it is very simple) and then use JavaScript to parse them and Oracle Maps API to create new FOI polygon and add it to mapviewer object. One disadvantage of this concept is that reloading of page (submit) is necessary.
    Branislav

  • Openstreetmap in mapviewer using wms

    Hi,
    I am trying to integrate openstreetmap with Map vieweer using a wms.
    After followring the post in Oracle Maps (SPATIAL/Mapviewer): Oracle Maps uses "Openstreetmap" as WMS I have been able to integrate it
    But the wms used here is only for Europe map.
    So can any one please let me know which wms url I should be using for World map of Openstreetmap ?
    and what will be the parameter values when creating the tile layer in Map viewer?
    Thanks

    Was addressed in the SR. It required the correct SRID in one case and the right request parameters in the other.

  • Rectangular polygon heat map using ssrs

    Hi all
    Until ssrs 2008 r2 including we had to implement an algorithm which calclated the coordinates of rectangular
    polygons in the ssrs heat map (implemented using a map component over sql server geometry data type).
    Is there any thing new regarding this problem in ssrs 2012 or 2014?
    Maybe power view gives the ability to implement this kind of a "map" without going through the trouble
    of preparing the coordinates for the map component??
    This is not a geographical map where coordinates are given through GPS...
    TIA!
    Rea

    Hi Robert,
    In your case, the issue may be due to that you have create an assembly, and then you register the assembly on a Microsoft SQL Server database. Then, you install a different version of the assembly in the Global Assembly Cache (GAC).
    In order to work around the issue, please use the ALTER ASSEMBLY statement to update the assembly in the database. If the problem still exists after you do this, drop the assembly from the database, and then register the new version of the assembly in the
    database.
    There is a similar issue for your reference.
    http://support.microsoft.com/kb/949080/en-us
    If the issue is persist, I recommend you post the issue in the following forum:
    .NET Framework inside SQL Server
    It is appropriate and more experts will assist you.
    Regards,
    Alisa Tang
    If you have any feedback on our support, please click
    here.
    Alisa Tang
    TechNet Community Support

  • Regarding svnant checkout using JavaAPI

    Hi,
    I am creating a small front end for my project which will be having 1-2 customized build related tasks.
    I am using Java APIs of ant to implement that.
    As our repository is SVN so I am using svnant for some svn tasks.
    But it is throwing null pointer exception when try to execute taskdef.
    PLease let me know where i m wrong
    the code is as follows
    =====================
    * testAnt.java
    * Created on December 27, 2005, 11:53 AM
    import java.io.File;
    import java.net.MalformedURLException;
    import org.apache.tools.ant.*;
    import org.apache.tools.ant.taskdefs.Mkdir;
    import org.apache.tools.ant.taskdefs.Taskdef;
    import org.apache.tools.ant.types.FileSet;
    import org.apache.tools.ant.types.Path;
    import org.tigris.subversion.svnant.*;
    import org.tigris.subversion.svnclientadapter.SVNUrl;
    //import org.tigris.subversion.svnclientadapter.javasvn.commands.CheckoutCommand;
    * @author aman_m`ahajan
    public class testANt {
    /** Creates a new instance of testAnt */
    public static void main(String arg[]){
    Project project = new Project();
    try {
    project.init();
    } catch (BuildException e) {
    e.printStackTrace();
    File f = new File("C:\\antAman");
              //Creates the new target
    //Target copyFile = new Target();
    Target checkout = new Target();
    //Sets the name of target
    //copyFile.setName("copyFile");
    checkout.setName("checkout");
    //Adds the target to the project
    //project.addTarget(copyFile);
    project.addTarget(checkout);
              //Mkdir is subclass of task class (This portion is ther
              // to define the tasks and set the values accordingly
              /*Mkdir makedir = new Mkdir();*/
              Taskdef td = new Taskdef();
              //td.setName("useSvn");
              td.setResource("org.tigris.subversion.svnant.SvnTask");
              //td.setClassname("org.tigris.subversion.svnant.SvnTask");
              Checkout co = new Checkout();
              //Sets teh task name
              //makedir.setTaskName("makedir");
              //As this task is related to creation of dir so setDir is required
              //makedir.setDir(f);
              //sets the project in target.
              //makedir.setProject(project);
              co.setProject(project);
              SVNUrl urlS = null;
              try {
                   urlS = new SVNUrl("http://x5.com/repo/branches/B2006_1_1/equicom-admin-common-web");
              } catch (MalformedURLException e1) {
                   e1.printStackTrace();
              co.setUrl(urlS);               
              co.setDestpath(f);
              //co.execute()
              td.setProject(project);
              td.setClasspath(pth);
              td.execute();
              //Add the task to target specified
              //copyFile.addTask(makedir);
              //checkout.addTask(co);
              //execute the target
              //copyFile.execute();
    ====================
    Actually there is no Javadocs for svnant so bit difficult to code too.
    Please help me to get rid of this problem so that i can check out the code.
    ~Aman

    It is not matter of ego with like and dislike ..it
    is matter of helping someone..Agree, but cross-posting is considered rude, and it's
    waste of others time.
    KajAgree. It is better to post a link to the original post, so that others are able to contribute in one place and there is no duplication of replies; hence no wasted time.

  • How to use mapviewer extension for jdevelop?

    I am working on the mapviewer. But my problem is that I can not connect mapviewer, or I can not start mapviewer using the embedded oc4j by jdeveloper. In mapviewer faq I read that:
    "How do I view the mapping metadata through JDeveloper's Connections Navigator?
    We have developed an Oracle JDeveloper extension that lets you browse the available list of styles, themes and basemaps defined in a datasource through JDeveloper's Connections Navigator. To do this, you will first need to download the mvconnection.jar file from OTN's MapViewer site. This jar contains the code that defines a MapViewer connection type for JDeveloper. To install, simply drop this jar file to the JDeveloper extension directory, normally $JDEV_HOME/jdev/lib/ext. Then restart JDeveloper, and you are all set.
    But when I restart jdeveloper, I got the message:
    "H:\Programme\jdev\jdev\lib\ext\mvpalette.jar!\META-INF\jdev-ext.xml
    Error: jar:file:/H:/Programme/jdev/jdev/lib/ext/mvpalette.jar!/META-INF/jdev-ext.xml<Line 105, Column 18>: XSD-2021: (Error) Element not completed: 'jsplibrary'
    H:\Programme\jdev\jdev\lib\ext\mvconnection.jar!\META-INF\jdev-ext.xml
    Error: jar:file:/H:/Programme/jdev/jdev/lib/ext/mvconnection.jar!/META-INF/jdev-ext.xml<Line 25, Column 20>: XSD-2034: (Error) Element 'description' not expected.
    Error: jar:file:/H:/Programme/jdev/jdev/lib/ext/mvconnection.jar!/META-INF/jdev-ext.xml<Line 26, Column 13>: XSD-2034: (Error) Element 'help' not expected.
    I use Jdeveloper 10g. Have you ever met the same problem?
    Thanks in advance

    The Map Viewer extension is still not available for JDeveloper 10g. It works with JDeveloper 9.
    The Mapping group is currently working on an upgrade.

  • Oracle Mapviewer Commercial Use

    Dear Sirs,
    Are there any well known examples of Oracle Mapviewer used commercially as a GIS Webserver?
    Thank You

    Hi,
    Warsaw City GISPortal
    http://mapa.um.warszawa.pl/mapaApp1/mapa?service=mapa
    currently only in PL language
    technology stack:
    Spatial+WLS(cluster) +MapViewer 11.1.7(js v1 API)
    BR,
    Tomek

  • MapViewer: send admin request using pl/sql

    Hello,
    i have a reqirement to send mapviewer admin requests to the mapviewer server using pl/sql.
    I found a java class in Re: How can I refresh the map cache for Oracle Maps ? , but i'm struggeling to replicate this functionality in pl/sql, without using java.
    Are there any examples out htere how to send admin requests to mapviewer using pl/sql?
    Thanks in advance,
    Dirk

    You may use the UTL_SMTP package to send e-mail via the SMTP protocol. This package has been available in the Oracle database since Oracle 8i Release 2 (8.1.6). For more information, please check its documentation in "Oracle8i Supplied PL/SQL Packages Reference".

  • Using Geocoder and Mapviewer

    Is there a best practices way of using Geocoding functions w/ Mapviewer? I purchased the Apress Spatial book and was planning on following the code examples but remembered seeing a Geocoder.ear setup awhile back and was wondering if it is still around and if it is the recommended approach.
    Thanks.

    Once you have your geocoding schema ready, then you can easily define a theme in MapViewer using the geocoding functions. For example:
        <theme name="geocode" >
           <jdbc_query
             datasource="gc"
             jdbc_srid="8307"
             spatial_column="geometry"
             render_style="M.STAR"
             asis="true"
             >select sdo_gcdr.geocode_as_geometry
                'SPATIAL',
                SDO_KEYWORDARRAY('1250 Clay Street','San Francisco, CA'),
                'US'
              ) geometry
              from dual
           </jdbc_query>
         </theme>

  • MapViewer WMS GetMap uses SDO_FILTER

    When I use the WMS request GetMap, MapViewer uses SDO_FILTER for the generated queries. This is not always accurate because sometimes features are not selected and drawn. How can I make MapViewer use SDO_RELATE instead of SDO_FILTER?

    The fact that mapping applications use sdo_filter is because it is much more faster to supply a resultset which normally is bigger than the actual set needed for a rectangular view in such an application, then to use an operator like sdo_relate to get an exact matching resultset.
    After all speed is important in (web)mapping applications.
    This is also noted in the user manual:
    http://download.oracle.com/docs/html/B14255_01/sdo_intro.htm#sthref91
    Extract:
    Spatial uses a spatial index to implement the primary filter. Spatial does not require the use of both the primary and secondary filters. In some cases, just using the primary filter is sufficient. For example, a zoom feature in a mapping application queries for data that has any interaction with a rectangle representing visible boundaries. The primary filter very quickly returns a superset of the query. The mapping application can then apply clipping routines to display the target area.
    The purpose of the primary filter is to quickly create a subset of the data and reduce the processing burden on the secondary filter. The primary filter, therefore, should be as efficient (that is, selective yet fast) as possible. This is determined by the characteristics of the spatial index on the data.
    However, I think, it should not return less features then the sdo_relate.
    Maybe a Mapviewer expert can help you further.
    Luc

  • Polygonal lasso tool not working with stylus on Surface Pro 2

    Hi guys,
    I'm new here so please bare with me if I'm posting in the wrong place or don't make immediate sense.
    Hardeware / software used: surface pro 2 and I'm running photoshop CS5.
    Problem is a fairly basic one: I am trying to make basic selections using the polygonal lasso tool (using the stylus that comes with the tablet) but it simply will not work. All I get when I touch the stylus to the screen is the circle that appears then fades. If I attach the keypad and try using that then it works no problem at all.
    Does anyone have any ideas as to whether there is a particular setting that I need to switch on or off e.g. something relating to pressure sensitivity (although not sure why this would affect this particular selection tool)?
    I've searched the web and come up with nothing so far so any help is greatly appreciated!
    Thanks for your time
    Scott

    same problem on surface pro 3 !!!!
    and i think quite significant, for lot of artists using polygonal lasso a lot (including me). How come that the stupid surface cannot work properly

  • Case Issue in Mapviewer WMS GetMap request

    I've been working with Mapviewer 10.1.2.0.2 for a couple weeks now and have used the wms_getmap_request using the XML API to get layers from various WMS servers including USGS. I am interested in getting images specifically from wms.jpl.nasa.gov as they seem to have better global coverage than USGS which is primarily interested in the US. I believe that the wms.jpl.nasa.gov is a non compliant WMS server because the REQUEST=GETMAP name pair in the url created by Mapviewer using the wms_getmap_request fails while using REQUEST=GetMap works.
    Here's and easy test: The URL in Example 1 fails while the Example 2 URL returns an image.
    Short of asking Nasa's Jet Propulsion Laboratory to get a new wms image server, is there a workaround for this that would force the url request to use the mixed case version of the value instead of the all upper case? From what I can tell they are a leading source of this kind of information.
    Example 1:
    http://wms.jpl.nasa.gov/wms.cgi?VERSION=1.1.1&REQUEST=GETMAP&SRS=EPSG:4326&BBOX=-123.3865,367766,-121.1365,38.2766&WIDTH=600&HEIGHT=400&FORMAT=image/jpeg&BGCOLOR=0xffffff&TRANSPARENT=true&LAYERS=global_mosaic&STYLES=pseudo_bright&EXCEPTIONS=application/vnd.ogc.se_inimage
    Example 2:
    http://wms.jpl.nasa.gov/wms.cgi?VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:4326&BBOX=-123.3865,36.7766,-121.1365,38.2766&WIDTH=600&HEIGHT=400&FORMAT=image/jpeg&BGCOLOR=0xffffff&TRANSPARENT=TRUE&LAYERS=global_mosaic&STYLES=pseudo_bright&EXCEPTIONS=application/vnd.ogc.se_inimage
    Thanks,
    Ken

    Hi,
    Since MapViewer is a component of Oracle App Server, any MapViewer patch will have to be part of an App Server-wide patch, which is out of the control of the Mapviewer team (schedule wise).
    We are however preparing for an early access release of MapViewer 11g, which will be available for download on OTN late Janurary 2006. That version will fix this issue (and also provides a ton of exciting new features).
    In the mean time, if you contact me directly we can probably help you on this issue now. [email protected] please replace _ with . for the correct email adderess.
    thanks

  • How do I change the width of the "polygon splitter" line?

    I have Ultiboard v10 with all the updates.  I have been unable to find a way to shrink the size of the line that the polygon splitter function uses.  The split seems to be stuck at 0.1 inches.  Anyone know how to change this setting?  Thanks for any help.

    When you start drawing the line that will act as the polygon splitter, make the first click where you want to start... then --before you do the second click-- go to the toolbar and look for the numeric field where you can change the mils width of the trace you are drawing... change the number there and see how the splitter line changes its width... no go back to the workspace, you still have the line drawing utility on, make the second click where you want to drop it and you should see a different width split line.
    The other method is, after you make the first click to mark the beginning of the line, continue towards the place where you would like to finish that line, however, before you do a left-click to finish the line, first do a right-click and you will have an option to widen and an option to narrow.
    I prefer the first method is more precise...
    Nestor
    National Instruments

  • Map_request not using size_hint

    Hi,
    we'd like to query mapviewer using an xml map_request. The output is supposed to use some sort of a fixed zoom.
    To achieve this we tried to use the size_hint parameter with a bounding_theme.
    <?xml version="1.0" standalone="yes"?>
    <map_request datasource="source" format="PNG_STREAM" width="1298" height="1082" antialiase="true" bgcolor="#c3c3c3" srid="31466">
    <bounding_themes size_hint="1234">qyThemeBasedFOI0</bounding_themes>
    <themes>
    <theme name="qyThemeBasedFOI0" template_theme="theme" render_labels="false" datasource="source">
    <binding_parameters>
    <parameter value="14000"></parameter>
    <parameter value="16000"></parameter>
    </binding_parameters>
    </theme>
    </themes>
    </map_request>
    From my point of view this should set the vertical size to 1234 meters (coordinate-system uses meter as unit).
    Switching to other numbers than 1234 doesn't change the result at all.
    Is the parameter broken or am I mistaken about the use of it?
    Thanks in advance,
    NilsO

    Shortened output from logfile:
    FINEST: Theme query [ QYD_SATT_GP_BAUFELDGRENZE ]: SELECT /*+ index(GP_BAUFELDGRENZE GP_BAUFELDGRENZE_SIDX) */ ID, GEOM, 'C.QY_EG_BAUFELDGRENZE', BAUFELDNUMMER, 'T.GP_BAUFELDNR', 1, 'rule#0', BAUFELDNUMMER, FLAECHE_TXT FROM GP_BAUFELDGRENZE WHERE 's'='s'  AND (FLAECHE >= :1 AND FLAECHE <= :2)
    INFO: [ QYD_SATT_GP_BAUFELDGRENZE ] sql exec time: 210ms, total time loading 7 features: 310ms.
    FINEST: mbr of all bounding themes: java.awt.geom.Rectangle2D$Double[x=2574640.868581982,y=5727712.757607207,w=1900.1805893070996,h=1583.9718009475619]
    INFO:  **** time spent on loading features: 320ms.
    FINEST: xfm: 0.6830929687968844 0.0 0.0 -0.6830929687968844 -1758719.074505455 3913642.3120096964
    FINER: time to render theme QYTHEMEBASEDFOI0 with 7 styled features: 30ms

  • How To Clear Mapviewer Tile Cache

    I am running a standalone version of Mapviewer using Weblogic Server.
    Weblogic and Mapviewer are running on a linux server with CentOS 5.8 64bit.
    - MapViewer Version: Ver11_1_1_7_1_B130516
    - Weblogic Server 10.3.6
    I am using Mapbuilder installed on a Win7 64bit client.
    - Mapbuilder Build: Ver11_1_1_7_1_B130516
    My datasource is an Oracle 11.2.0.3 database running on a linux server with CentOS 5.8 64bit.
    I am using the new HTML5 JavaScript mapping API to render my map.  I am using any one of the following browsers:
    IE10 (v10.0.9200.16635)
    Firefox (v23.0)
    Chrome (v28.0.1500.95 m
    I have created the following Mapbuilder objects:
    Geometry Theme: SRA_SUITE304_F1_ROOM
    - for the label styling rules, I have set the Label Function = 1, so that labels will be displayed for the objects
    Base Map: SRA_ALL
    <?xml version="1.0" standalone="yes"?>
    <map_definition>
          <theme name="SRA_SUITE304_F1_ROOM"/>
      </map_definition>
    Tile Layer: SRA_ALL
    <map_tile_layer name="SRA_ALL" image_format="PNG" http_header_expires="168.0" concurrent_fetching_threads="3">
         <internal_map_source data_source="ICLOGIT1" base_map="SRA_ALL" bgcolor="#ccccff"/>
         <coordinate_system srid="4326" minX="-74.54" minY="39.407" maxX="-74.53" maxY="39.41"/>
         <tile_image width="256" height="256"/>
         <zoom_levels levels="10" min_scale="100.0" max_scale="1600.0" min_tile_width="6.097560975612876E-5" min_tile_height="9.090909090913742E-4">
              <zoom_level level="0" name="level0" description="" scale="1600.0" tile_width="9.090909090913742E-4" tile_height="9.090909090913742E-4"/>
              <zoom_level level="1" name="level1" description="" scale="1175.0" tile_width="7.142857142860797E-4" tile_height="7.142857142860797E-4"/>
              <zoom_level level="2" name="level2" description="" scale="864.0" tile_width="5.263157894739535E-4" tile_height="5.263157894739535E-4"/>
              <zoom_level level="3" name="level3" description="" scale="634.0" tile_width="3.846153846155814E-4" tile_height="3.846153846155814E-4"/>
              <zoom_level level="4" name="level4" description="" scale="466.0" tile_width="2.7777777777791986E-4" tile_height="2.7777777777791986E-4"/>
              <zoom_level level="5" name="level5" description="" scale="342.0" tile_width="2.0833333333343992E-4" tile_height="2.0833333333343992E-4"/>
              <zoom_level level="6" name="level6" description="" scale="251.0" tile_width="1.5151515151522904E-4" tile_height="1.5151515151522904E-4"/>
              <zoom_level level="7" name="level7" description="" scale="185.0" tile_width="1.1235955056185523E-4" tile_height="1.1235955056185523E-4"/>
              <zoom_level level="8" name="level8" description="" scale="136.0" tile_width="8.264462809921583E-5" tile_height="8.264462809921583E-5"/>
              <zoom_level level="9" name="level9" description="" scale="100.0" tile_width="6.097560975612876E-5" tile_height="6.097560975612876E-5"/>
       </zoom_levels>
    </map_tile_layer>
    I am using the following HTML to display the map using the Tile Layer SRA_ALL:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>SRA2 - Map 01 - 10 Zoom Levels</title>
    <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
    <script type='text/javascript' src='http://xxxx.xxxx.com:7002/mapviewer/jslib/v2/oraclemapsv2.js'></script>
    <style type= 'text/css '>body {cursor:default;}</style>
    <script language="JavaScript" type="text/javascript">
    var baseURL="http://xxxx.xxxx.com:7002/mapviewer";  // location of mapviewer
        function showMap()
            var map = new OM.Map(
            document.getElementById('map'),
                mapviewerURL:baseURL
            var tileLayer2 = new OM.layer.TileLayer(
            "SRA_ALL",
                dataSource:"xxxx",
                tileLayer:"SRA_ALL"
            map.addLayer(tileLayer2) ;
            map.addScaleBar() ;
            map.addNavigationPanelBar() ;
            map.setMapCenter(new OM.geometry.Point(-74.537446,39.409008,4326) );
            map.setMapZoomLevel(3) ;
            map.init() ;
    </script>
    </head>
    <body onload="javascript:showMap()">
        <DIV id=map style="width:99%;height:99%"></DIV>
    </body>
    </html>
    This produces a correctly rendered map in my browsers, which displays the labels I expect.
    Next, I changed the Labeling Function on my Geometry Theme: SRA_SUITE304_F1_ROOM, setting it to -1, so that object labels would not be displayed.
    In Mapbuilder, I can preview the geometry theme, and it shows that no labels are displayed.
    Still in Mapbuilder, I can preview the base map that the geometry theme is assigned to, and the basemap also shows that no labels are displayed for that theme.
    I saved all my changes in Mapbuilder.
    However, when I view my map (using the same HTML code) in the browser, the map still shows the labels.
    I have tried all of the following:
    1) purging the geometry cache for the affected map datasource using the MapViewer Administration Console
    2) purging the browser cache
    3) restarting the mapviewer server
    4) restarting the entire supporting weblogic server
    None of these actions cause the map viewed in my browser to be updated to show the map without labels.
    Note: If I create a new Tile Layer using the same base map, my changes are visible in the browser map.
    What am I missing here?
    What cache do I need to clear so that my map is displayed correctly in my browser after I make changes to the underlying Mapbuilder objects?
    Thanks in advance for your help.

    Thanks.  That was the last key to the puzzle.
    Here are the steps I now follow to ensure that changes made to underlying MapBuilder objects are visible in the browser.
    Perform the following steps:
    1) Modify the object (style, theme, base map, tile layer) in MapBuilder, and save all changes.
    2) Using MapViewer Administration Console, Purge Cached Metadata for each affected datasource.
    3) On the MapViewer server, clear the Map Cache directory.  The location of the Map Cache directory is specified in the mapViewerConfig.xml file under the section "Map Cache Server Setting".
    e.g.
    cd <map cache dir>
    rm -rf *
    4) Clear the browser cache and temp files for the browser you are using (e.g. IE, Firefox, Chrome).  If you think you are not clearing the cache completely, then use the appropriate "private browsing" feature of the browser to view the map.  You should then be able to see the changes made to the map in the browser.

Maybe you are looking for