php微信开发 (获取用户地理位置)

private function receiveEvent($object)
{
    $contentStr = "";
    switch ($object->Event)
    {
        case "subscribe":
            $contentStr = "欢迎关注方倍工作室";
            break;
        case "LOCATION":
            $contentStr = "纬度 ".$object->Latitude." 经度".$object->Longitude;
            break;
        default:
            break;
    }
    $resultStr = $this->transmitText($object, $contentStr);
    return $resultStr;

}

转:http://www.cnblogs.com/txw1958/p/weixin--get-user-geographic-position.html

你可能感兴趣的:(php微信开发 (获取用户地理位置))