Ejemplo n.º 1
0
        ////////////////////////////////////////////////////////////////////////////
        //--------------------------------- REVISIONS ------------------------------
        // Date       Name                 Tracking #         Description
        // ---------  -------------------  -------------      ----------------------
        // 20JUN2009  James Shen                              Initial Creation
        ////////////////////////////////////////////////////////////////////////////

        /**
         * This method issues a new directions query. The query parameter is
         * a string containing any valid directions query,
         * e.g. "from: Seattle to: San Francisco" or
         * "from: Toronto to: Ottawa to: New York".
         * @param query the directions query string
         * @param listener the routing listener.
         */
        public void GetDirection(string query, IRoutingListener listener)
        {
            _listener   = listener;
            _routeQuery = query;
            if (!_isChina)
            {
                Arg[] args =
                {
                    new Arg("q",      query),
                    new Arg("output", "js"),
                    new Arg("oe",     "utf8"),
                    new Arg("key",    _queryKey),
                    null
                };
                Request.Get(SEARCH_BASE, args, null, _directionQuery, this);
            }
            else
            {
                Arg[] args =
                {
                    new Arg("q",      query),
                    new Arg("output", "js"),
                    new Arg("ie",     "utf8"),
                    new Arg("oe",     "utf8"),
                    null
                };
                Request.Get(SEARCH_BASE_CHINA, args, null, _directionQuery, this);
            }
        }
Ejemplo n.º 2
0
        ////////////////////////////////////////////////////////////////////////////
        //--------------------------------- REVISIONS ------------------------------
        // Date       Name                 Tracking #         Description
        // ---------  -------------------  -------------      ----------------------
        // 20JUN2009  James Shen                              Initial Creation
        ////////////////////////////////////////////////////////////////////////////

        /**
         * @inheritDoc
         */
        public void GetDirection(int mapType, string query, IRoutingListener listener)
        {
            _isChina = mapType == MapType.MICROSOFTCHINA ||
                       mapType == MapType.GOOGLECHINA || mapType == MapType.MAPABCCHINA;
            SetChina(_isChina);
            SetGoogleKey(GoogleQueryKeys[GoogleKeyIndex]);
            GetDirection(query, listener);
            GoogleKeyIndex++;
            GoogleKeyIndex %= 10;
        }
Ejemplo n.º 3
0
 ////////////////////////////////////////////////////////////////////////////
 //--------------------------------- REVISIONS ------------------------------
 // Date       Name                 Tracking #         Description
 // ---------  -------------------  -------------      ----------------------
 // 18JUN2009  James Shen                 	          Initial Creation
 ////////////////////////////////////////////////////////////////////////////
 /**
  * Set the listener for direction query.
  * @param routingListener the routing listener
  */
 public void SetRoutingListener(IRoutingListener routingListener)
 {
     _digitalMapService.SetRoutingListener(routingListener);
 }
Ejemplo n.º 4
0
        ////////////////////////////////////////////////////////////////////////////
        //--------------------------------- REVISIONS ------------------------------
        // Date       Name                 Tracking #         Description
        // ---------  -------------------  -------------      ----------------------
        // 20JUN2009  James Shen                              Initial Creation
        ////////////////////////////////////////////////////////////////////////////

        /**
         * Set the listener for direction query.
         * @param routingListener the routing listener
         *
         */
        public void SetRoutingListener(IRoutingListener routingListener)
        {
            _routingListener = routingListener;
        }
Ejemplo n.º 5
0
 ////////////////////////////////////////////////////////////////////////////
 //--------------------------------- REVISIONS ------------------------------
 // Date       Name                 Tracking #         Description
 // ---------  -------------------  -------------      ----------------------
 // 20JUN2009  James Shen                 	          Initial Creation
 ////////////////////////////////////////////////////////////////////////////
 /**
  * @inheritDoc
  */
 public void GetDirection(int mapType, string query, IRoutingListener listener)
 {
     _isChina = mapType == MapType.MICROSOFTCHINA ||
             mapType == MapType.GOOGLECHINA || mapType == MapType.MAPABCCHINA;
     SetChina(_isChina);
     SetGoogleKey(GoogleQueryKeys[GoogleKeyIndex]);
     GetDirection(query, listener);
     GoogleKeyIndex++;
     GoogleKeyIndex %= 10;
 }
Ejemplo n.º 6
0
 ////////////////////////////////////////////////////////////////////////////
 //--------------------------------- REVISIONS ------------------------------
 // Date       Name                 Tracking #         Description
 // ---------  -------------------  -------------      ----------------------
 // 20JUN2009  James Shen                 	          Initial Creation
 ////////////////////////////////////////////////////////////////////////////
 /**
  * This method issues a new directions query. The query parameter is
  * a string containing any valid directions query,
  * e.g. "from: Seattle to: San Francisco" or
  * "from: Toronto to: Ottawa to: New York".
  * @param query the directions query string
  * @param listener the routing listener.
  */
 public void GetDirection(string query, IRoutingListener listener)
 {
     _listener = listener;
     _routeQuery = query;
     if (!_isChina)
     {
         Arg[] args = {
         new Arg("q", query),
         new Arg("output", "js"),
         new Arg("oe", "utf8"),
         new Arg("key", _queryKey),
         null
     };
         Request.Get(SEARCH_BASE, args, null, _directionQuery, this);
     }
     else
     {
         Arg[] args = {
         new Arg("q", query),
         new Arg("output", "js"),
         new Arg("ie", "utf8"),
         new Arg("oe", "utf8"),
         null
     };
         Request.Get(SEARCH_BASE_CHINA, args, null, _directionQuery, this);
     }
 }
Ejemplo n.º 7
0
        ////////////////////////////////////////////////////////////////////////////
        //--------------------------------- REVISIONS ------------------------------
        // Date       Name                 Tracking #         Description
        // ---------  -------------------  -------------      ----------------------
        // 20JUN2009  James Shen                 	          Initial Creation
        ////////////////////////////////////////////////////////////////////////////
        /**
         * Set the listener for direction query.
         * @param routingListener the routing listener

         */
        public void SetRoutingListener(IRoutingListener routingListener)
        {
            _routingListener = routingListener;
        }
Ejemplo n.º 8
0
        ////////////////////////////////////////////////////////////////////////////
        //--------------------------------- REVISIONS ------------------------------
        // Date       Name                 Tracking #         Description
        // ---------  -------------------  -------------      ----------------------
        // 18JUN2009  James Shen                              Initial Creation
        ////////////////////////////////////////////////////////////////////////////

        /**
         * Set the listener for direction query.
         * @param routingListener the routing listener
         */
        public void SetRoutingListener(IRoutingListener routingListener)
        {
            _digitalMapService.SetRoutingListener(routingListener);
        }