How to add labels to Google Maps (learn latitude and show the location icon)

Source: Internet
Author: User
How does Google Maps add annotations (learn latitude and show the location icon)?
Look at Google's API for a long while not found?
Want to ask a friend you've done?
How does Google Maps add annotations (learn latitude and show the location icon)?

------Solution--------------------
can go to see our website, hehe www.niaoke.com
------Solution--------------------
First, Google itself API is provided with (simple)
Second, to Google or MAPABC purchase (full function, charge)
Third, the form of their own hacker (I realized before, but it is said that the interface has changed, so it will not be used, otherwise provided to you for free)

------Solution--------------------
Do not know what the LZ specifically to do, if it is to take the coordinates,
You can refer to the code here:
HTML Code
      <title>Google Maps JavaScript API example-simple</title>                    


------Solution--------------------
$ (' #Label2 '). Click (function () {
Googlemapaddevent (MyMap, "click", Function (marker, point) {
if (marker)
{
Mymap.removeoverlay (marker);

}
Else
{
Mymap.clearoverlays ();
var dmarker = new Gmarker (point, {draggable:true});
var dpoint;
var x;
var y;
x = Googlemappointx (point);
y = Googlemappointy (point);
document.getElementById ("TextBox2"). Value = x;
document.getElementById ("TextBox1"). Value = y;
if (document.getElementById ("Hidsyid"). value== ")//NULL indicates the initial incoming monitoring point code
// {
document.getElementById ("HIDW"). Value=x;
document.getElementById ("Hidj"). Value=y;
// }
Gevent.addlistener (Dmarker, "DragStart", function () {
});

Gevent.addlistener (Dmarker, "Dragend", function () {
Dpoint=dmarker.getpoint ();
Mymap.panto (Dpoint);
x = Dpoint.lat ();
y = dpoint.lng ();
document.getElementById ("TextBox2"). Value = x;
document.getElementById ("TextBox1"). Value = y;
if (document.getElementById ("Hidsyid"). value== ")
// {
document.getElementById ("HIDW"). Value=x;
document.getElementById ("Hidj"). Value=y;
  • 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.