久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    1. <legend id='Z4SuV'><style id='Z4SuV'><dir id='Z4SuV'><q id='Z4SuV'></q></dir></style></legend>
      • <bdo id='Z4SuV'></bdo><ul id='Z4SuV'></ul>

    2. <i id='Z4SuV'><tr id='Z4SuV'><dt id='Z4SuV'><q id='Z4SuV'><span id='Z4SuV'><b id='Z4SuV'><form id='Z4SuV'><ins id='Z4SuV'></ins><ul id='Z4SuV'></ul><sub id='Z4SuV'></sub></form><legend id='Z4SuV'></legend><bdo id='Z4SuV'><pre id='Z4SuV'><center id='Z4SuV'></center></pre></bdo></b><th id='Z4SuV'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Z4SuV'><tfoot id='Z4SuV'></tfoot><dl id='Z4SuV'><fieldset id='Z4SuV'></fieldset></dl></div>

      <tfoot id='Z4SuV'></tfoot>

        <small id='Z4SuV'></small><noframes id='Z4SuV'>

      1. 谷歌地圖:是多邊形內(nèi)的緯度/經(jīng)度嗎?

        Google Map: is a lat/lng within a polygon?(谷歌地圖:是多邊形內(nèi)的緯度/經(jīng)度嗎?)

          • <bdo id='SI15l'></bdo><ul id='SI15l'></ul>
              <tbody id='SI15l'></tbody>
            <legend id='SI15l'><style id='SI15l'><dir id='SI15l'><q id='SI15l'></q></dir></style></legend>

                <small id='SI15l'></small><noframes id='SI15l'>

                  <i id='SI15l'><tr id='SI15l'><dt id='SI15l'><q id='SI15l'><span id='SI15l'><b id='SI15l'><form id='SI15l'><ins id='SI15l'></ins><ul id='SI15l'></ul><sub id='SI15l'></sub></form><legend id='SI15l'></legend><bdo id='SI15l'><pre id='SI15l'><center id='SI15l'></center></pre></bdo></b><th id='SI15l'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='SI15l'><tfoot id='SI15l'></tfoot><dl id='SI15l'><fieldset id='SI15l'></fieldset></dl></div>
                  <tfoot id='SI15l'></tfoot>
                  本文介紹了谷歌地圖:是多邊形內(nèi)的緯度/經(jīng)度嗎?的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  給定一對(duì) lat/lng 值,我如何確定該對(duì)是否在多邊形內(nèi)?我需要在 PHP 中執(zhí)行此操作.我看到 Google Maps API 有一個(gè) containsLocation 方法:https://developers.google.com/maps/documentation/javascript/reference.有沒有辦法從 PHP 中利用它?

                  Given a pair of lat/lng values, how do I determine if the pair is within a polygon? I need to do this in PHP. I see that Google Maps API has a containsLocation method: https://developers.google.com/maps/documentation/javascript/reference. Is there a way to leverage this from PHP?

                  推薦答案

                  判斷點(diǎn)是否在多邊形內(nèi)的一種方法是計(jì)算從該點(diǎn)(在任何方向)繪制的線與多邊形邊界相交的次數(shù).如果它們相交的次數(shù)為偶數(shù),則該點(diǎn)在外面.

                  One way to find if a point is in a polygon is to count how many times a line drawn from the point (in any direction) intersects with the polygon boundary. If they intersect an even number of times, then the point is outside.

                  我已經(jīng)在 php 中實(shí)現(xiàn)了這篇 Point in Polygon 文章中的 C 代碼并使用下面的多邊形來說明.

                  I have implemented the C code from this Point in Polygon article in php and used the polygon below to illustrate.

                  <?php
                  //Point-In-Polygon Algorithm
                  $polySides  = 4; //how many corners the polygon has
                  $polyX    =  array(4,9,11,2);//horizontal coordinates of corners
                  $polyY    =  array(10,7,2,2);//vertical coordinates of corners
                  $x = 3.5;
                  $y = 13.5;//Outside
                  //$y = 3.5;//Inside
                  
                  function pointInPolygon($polySides,$polyX,$polyY,$x,$y) {
                    $j = $polySides-1 ;
                    $oddNodes = 0;
                    for ($i=0; $i<$polySides; $i++) {
                      if ($polyY[$i]<$y && $polyY[$j]>=$y 
                   ||  $polyY[$j]<$y && $polyY[$i]>=$y) {
                      if ($polyX[$i]+($y-$polyY[$i])/($polyY[$j]-$polyY[$i])*($polyX[$j]-$polyX[$i])<$x)    {
                      $oddNodes=!$oddNodes; }}
                     $j=$i; }
                  
                    return $oddNodes; }
                  
                  
                   if (pointInPolygon($polySides,$polyX,$polyY,$x,$y)){
                    echo "Is in polygon!";
                  }
                  else echo "Is not in polygon";
                  ?>
                  

                  這篇關(guān)于谷歌地圖:是多邊形內(nèi)的緯度/經(jīng)度嗎?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動(dòng)游標(biāo)不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術(shù)方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個(gè)值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅(qū)動(dòng)程序)
                    <tbody id='0xsvo'></tbody>
                    <i id='0xsvo'><tr id='0xsvo'><dt id='0xsvo'><q id='0xsvo'><span id='0xsvo'><b id='0xsvo'><form id='0xsvo'><ins id='0xsvo'></ins><ul id='0xsvo'></ul><sub id='0xsvo'></sub></form><legend id='0xsvo'></legend><bdo id='0xsvo'><pre id='0xsvo'><center id='0xsvo'></center></pre></bdo></b><th id='0xsvo'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='0xsvo'><tfoot id='0xsvo'></tfoot><dl id='0xsvo'><fieldset id='0xsvo'></fieldset></dl></div>

                    1. <small id='0xsvo'></small><noframes id='0xsvo'>

                      <tfoot id='0xsvo'></tfoot>
                        <bdo id='0xsvo'></bdo><ul id='0xsvo'></ul>
                      • <legend id='0xsvo'><style id='0xsvo'><dir id='0xsvo'><q id='0xsvo'></q></dir></style></legend>

                          1. 主站蜘蛛池模板: .国产精品成人自产拍在线观看6 | 久久久免费精品 | 国产欧美精品区一区二区三区 | 国产精品久久久久久久久久三级 | 一级黄色片在线免费观看 | 欧美一区二区三区小说 | 亚洲精品久久久蜜桃网站 | 国产精品大片 | 亚洲午夜在线 | www.日韩免费 | 天天天天操 | 欧美视频 | 欧美一区二区免费视频 | 国产成人免费观看 | 丁香久久 | 精品国产乱码久久久久久老虎 | 欧美成人久久 | 国产一区二区在线免费观看 | 亚洲国产中文字幕 | 日本在线一区二区 | 老妇激情毛片免费 | 亚洲黄色一区二区三区 | 日韩欧美在线播放 | 2019天天干天天操 | 精品免费国产视频 | 久久婷婷色 | 色视频在线播放 | 91精品国产91久久久久久最新 | 日韩二区 | 欧美一级在线免费 | 亚洲午夜精品一区二区三区他趣 | 久久精品无码一区二区三区 | 一区二区三区四区国产精品 | 久久精品视频在线免费观看 | 久久久久久久久一区 | 欧美综合国产精品久久丁香 | 国产精品美女久久久久aⅴ国产馆 | 国产精品3区 | 中文字幕色站 | 免费在线日韩 | 欧美综合国产精品久久丁香 |