• Using X++ code achieve access to Google Maps


    Somtimes,Purchase or sale market User hope to know the customer or vendor address.

    so,I have used X++ code achieve to access to Google Maps.

    Come on!Enjoying...
    worte by Jimmy on Feb 16th 2011.

     

    static void Jimmy_GoogleMaps(Args _args)
    {
    /**
    Google maps begin here
    worte by Jimmy on Feb 16th 2011
    */
        #Define.MapURL('Http://maps.google.com.au?q=\%1')
        #Define.comma(' ')
        #Define.newLine('\n')
        str     addressStr;
        Address Address;
    ;
        select firstonly Address where Address.Street != '';
    
        addressStr = Address.Street + #comma + Address.City + #comma +  Address.State + #comma +
                     Address.ZipCode + #comma + Address.CountryRegionId;
        if(!Address)
            addressStr = "南丰县 太和镇 太和村 黄家岭" + #comma + "抚州市" + #comma + "江西省" + #comma +  '中国';
            //addressStr = "石城县木兰乡东坑村沉香排" + #comma + "赣州市" + #comma + "江西省" + #comma +  '中国';        ;
            //addressStr = "石城县 木兰乡 新河村" + #comma + "赣州市" + #comma + "江西省" + #comma +  '中国';
            //addressStr = "东城区余屋工业区草塘一路18号" + #comma + '东莞市' + #comma + '广东省' + #comma +  '中国'
           
    
        //Repalce the newLine with comma
        addressStr = strReplace(addressStr,#newLine,#comma);
    
        //URL Encode(使用指定的编码对象对 URL 字符串进行编码,以便实现从 Web 服务器到客户端的可靠 HTTP 传输。)
        addressStr = System.Web.HttpUtility::UrlEncode(addressStr);
    
        //Add the address to the URL
        Infolog.urlLookup(strfmt(#MapURL,addressStr));
    }
    
  • 相关阅读:
    HTML
    数据挖掘之分类——基于规则的分类器
    Ubuntu 14.04下Hadoop2.4.1集群安装配置教程
    Jdk1.7+eclipse搭建Java开发环境
    约瑟夫环问题
    Linux 绝对路径与相对路径
    排序算法汇总
    朋友圈问题
    HTTP状态码
    哈希冲突,哈希函数
  • 原文地址:https://www.cnblogs.com/Fandyx/p/1955714.html
Copyright © 2020-2023  润新知