5 Replies Latest reply: Sep 17, 2013 6:51 AM by gdildine RSS

    Multiple Zoom Panels - Mapviewer

    User638087-Oracle

      Hi Guys,

       

      One of our customer has used google for base map.

      He created a tile layer using google as source in mapviewer console.

       

      But the problem is they are seeing 2 zoom panels. One the normal map-viewer zoom panel and other google zoom panel.

       

      Any ideas on why this happens ? Or how can we disable the google zoom panel ?

       

      Thanks for the help.

        • 1. Re: Multiple Zoom Panels - Mapviewer
          jsharma-Oracle

          There was probably some change in the google API that needs a corresponding change in the mapviewer API.

           

          File an SR/Bug if there isn't one already.

          • 2. Re: Multiple Zoom Panels - Mapviewer
            gdildine

            I am having this same problem.  Why is it that the google maps pan/zoom (navigation) control does not show up in latest Mapviewer tutorial (reference Tutorial no B04), but it does in practice.   There must be some work around being done in the tutorial, else why wouldn't the control show up? 

             

            I need this for a US State Agency trying to make a decision on whether or not to use MapViewer or restrict to ArcGIS Server only.   Some direction would be greatly appreciated.

             

            A couple of other issues worth noting as follows:

            a) vector and tile layers can get out of sync from google tile layers when zooming in too far.  Once out of sync, this is not corrected when zooming back out.  Test this overlay vector roads on road maptype tile.  Zoom in to zoom 17, then switch to satellite, then switch to shaded.   After switching to shaded the mapviewer geometry and shaded goolge map become out of sync.

            b) when zooming in to level 17 and larger, on the Satellite maptype, the Google imagery skews (perhaps changes into more of perspective geometry), thus making MapViewer vectors misalign.   These are corrected once the user zooms back out to zoom 16 or smaller.

            • 3. Re: Multiple Zoom Panels - Mapviewer
              lqian

              Note that the OP is probably talking about the v1 API, whereas you seem to be working with the V2 (html5) API.  As far as we know only V1 has the dual zoom bar issue (and a fix will be coming soon in a patch).

               

              Regarding the out of sync issue, do you have a test case or can reproduce it using our public tutorial page here (Oracle Mapviewer Tutorials)? You can directly modify the JS code there and click the Run button to activate the modified code.  If you were able to reproduce the issues, please note the steps and code snippet here so we can do the same and diagnose if there is a real issue.

               

              thanks

              LJ

              • 4. Re: Multiple Zoom Panels - Mapviewer
                gdildine

                LJ,

                     I have posted the entire html test script.  It is based directly upon Mapviewer Demo Tutorials (B04 and B06) and v2.   As you can see from below (reference to oraclemapsv2.js, OM object), I don't see how this could possibly be referencing v1.   Please copy and paste into text file and give it a test (assuming port 7003 is not blocked) you should be able to directly verify points from the prior email points above.

                 

                 

                 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
                <html>
                <head>
                <title></title>
                <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
                <script type='text/javascript' src='http://itis-db3.com:7003/mapviewer/jslib/v2/oraclemapsv2.js'></script>
                <style type= 'text/css'>body {cursor:default;}</style>
                <script language="JavaScript" type="text/javascript">
                
                    var map = null;
                    var tileLayer1 = null;
                    var tileLayer2 = null;
                    var baseURL  = "http://itis-db3.com:7003/mapviewer";
                    function showMap()
                    {
                        map = new OM.Map(
                        document.getElementById('map'),
                        {
                            mapviewerURL:baseURL
                        }) ;
                        tileLayer1 =  new OM.layer.GoogleTileLayer("baseMap1",{mapTypeList:"OM.layer.GoogleTileLayer.TYPE_ROAD;OM.layer.GoogleTileLayer.TYPE_SATELLITE;OM.layer.GoogleTileLayer.TYPE_SHADED",mapTypeVisible:true});
                        tileLayer2 = new OM.layer.TileLayer("baseMap2",
                        {
                            dataSource:"itis-db3-wy",
                            tileLayer:"IXN_BASEMAP"
                        });
                        vectorlayer1 = new OM.layer.VectorLayer("vectorLayer1",
                        {
                            def:{
                                type:OM.layer.VectorLayer.TYPE_PREDEFINED,
                                dataSource:"itis-db3-wy",
                                theme:"IXN_INTERSECTIONS_3857",
                                url: baseURL,
                                loadOnDemand:true
                            }
                        });
                        vectorlayer1.setZoomLevelRange(17, 19);
                        vectorlayer2 = new OM.layer.VectorLayer("vectorLayer2",
                        {
                            def:{
                                type:OM.layer.VectorLayer.TYPE_PREDEFINED,
                                dataSource:"itis-db3-wy",
                                theme:"IXN_INSXN_LEGS_3857",
                                url: baseURL,
                                loadOnDemand:true
                            }
                        });
                        vectorlayer2.setZoomLevelRange(17, 19);
                        // add a vectorlayer. conversion from srid 90000006 to 4055 will occur on the server
                        //vectorlayer1.setLabelsVisible(true);
                        map.addLayer(tileLayer1) ;  // google tiles
                        map.addLayer(tileLayer2) ;// mapviewer tiles
                        map.addLayer(vectorlayer2) ; // mapviewer vectors
                        map.addLayer(vectorlayer1) ; // mapviewer vectors
                        map.addNavigationPanelBar();
                        map.setMapCenter(new OM.geometry.Point(-104.81539,41.163299,8307) );
                        map.setMapZoomLevel(17);
                        map.init();
                        vectorlayer1.bringToTop(); 
                    }
                </script>
                </head>
                <body onload="javascript:showMap()">
                    <DIV id=map style="width:99%;height:99%" ></DIV>
                </body>
                </html>
                
                • 5. Re: Multiple Zoom Panels - Mapviewer
                  gdildine

                  I was able to fix this by making a change to the oraclemapsv2.js file.  Search on navigationControl:false and replace it with zoomControl:false, panControl:false.  After this, the google zoom and pan controls disappear.

                   

                  Note this should be changed in the oraclemapsv2.js (and related files).