php使用google地圖介面開發應用的例子

WBOY
發布: 2016-07-25 08:52:13
原創
1217 人瀏覽過
  1. function selected ( $param , $value ) {
  2. if ( $param == $value ) print "SELECTED" ;
  3. }
  4. # Collect any form data to control the display
  5. $scale = 10 ;
  6. $maptype = "G_NORMAL_MAP" ;
  7. if ( $_REQUEST [ scale ]) $scale = $_REQUEST [ scale ];
  8. if ( $_REQUEST [ maptype ]) $maptype = $_REQUEST [ maptype ];
  9. # Geocoding your location
  10. # Note - you would cache this in a file
  11. # The key is domain specific - your google maps教程 key
  12. /*
  13. $location = file("http://maps.google.com/maps/geo?q=48 Spa Road, Melksham, UK&
  14. output=csv&key=ABQIAAAAvp3__HwvT3VkixIIbsW0axQuKI_6t1bH2P0vCI_Q8jfpn8qdNBQMnnelj
  15. xh9czilkau_bYSCXteS_A");
  16. */
  17. # Following line is hard coded for demo
  18. $location [ 0 ]= "200,8,51.369318,-2.133457" ;
  19. list ( $stat , $acc , $north , $east ) = explode ( "," , $location [ 0 ]);
复制代码

html页面:

  1. php调用谷歌地图接口 - www.plcxue.com
  2. Well House Manor, Melksham


  3. ? Business Hotel in Melksham
  4. ? All rooms fitted to superior standard
  5. ? Internet Access throughout
  6. ? Plenty of parking and close to town centre

  7. Well House
  8. Manor website
  9. Change to

  10. This is a sample PHP page with Google Maps
  11. teach you how to write pages like this
  12. Date -
复制代码


來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板