zoukankan      html  css  js  c++  java
  • 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));
    }
    
  • 相关阅读:
    jquery easyui 时间控件的使用
    3101 php 学习推荐
    报到
    《C++语言的设计和演化》摘录
    怀念下以前听摇滚乐的日子
    Maven無法下載依賴時的解決方案
    RDF和Jena RDF API入门(2)
    WEB数据挖掘(五)——Aperture数据抽取(1)
    RDF和Jena RDF API入门(1)
    Ubuntu SVN安装配置十分简单
  • 原文地址:https://www.cnblogs.com/Fandyx/p/1955714.html
Copyright © 2011-2022 走看看