Example of using google Map interface to develop applications in php

Source: Internet
Author: User
Example of using google Map interface to develop applications in php

  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 wocould cache this in a file
  11. # The key is domain specific-your google maps tutorial 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] = "51.369318, 2.133457 ";
  19. List ($ stat, $ acc, $ north, $ east) = explode (",", $ location [0]);

Html page:

  1. Php calls Google map interface-www.plcxue.com

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.