For map development, some operations and interactions of marker are most commonly used. For a brief introduction, the distance between two marker is calculated. If you are interested, refer to the following. I hope to help you calculate the distance between two marker by Google Map V3 javascript.
For map development, some operations and interactions of marker are most commonly used. A brief introduction is the distance calculation between two marker.
Google map api is very convenient, as long as it is commonly used, there are basically interfaces.
1. Create two marker points
The Code is as follows:
Var oldMarker = new google. maps. Marker ({
Position: new google. maps. LatLng ("31.95678", "177.898673 "),
Map: map,
Title: "old"
});
Var newMarker = new google. maps. Marker ({
Position: new google. maps. LatLng ("31.45678", "177.098673 "),
Map: map,
Title: "new"
});
2. Load the geometry Database
The Code is as follows: