Geo-Google-PolylineEncoder
view release on metacpan or search on metacpan
t/js_reference/polyline.js view on Meta::CPAN
// move if moveMap is true.
if (moveMap) {
document.map.setCenter(
new GLatLng(points[0].Latitude, points[0].Longitude),
document.map.getZoom());
}
document.getElementById('encodedLevels').value = encoded_levels;
document.getElementById('encodedPolyline').value = encoded_points;
if (document.overlay) {
document.map.removeOverlay(document.overlay);
}
if (points.length > 1) {
document.overlay = GPolyline.fromEncoded({color: "#0000FF",
weight: 10,
points: encoded_points,
zoomFactor: 32,
levels: encoded_levels,
numLevels: 4
});
document.map.addOverlay(document.overlay);
}
}
function centerMap() {
var address = document.getElementById('txtAddress').value;
if (address.length > 0) {
var geocoder = new GClientGeocoder();
geocoder.getLatLng(address,
t/js_reference/polyline.js view on Meta::CPAN
if (!GBrowserIsCompatible()) {
alert('Your browser is not compatible with the Google Maps API');
return;
}
document.map = new GMap2(document.getElementById("map_canvas"));
document.map.setCenter(new GLatLng(37.4419, -122.1419), 13);
document.map.addControl(new GSmallMapControl());
document.map.addControl(new GMapTypeControl());
GEvent.addListener(document.map, "click", function(overlay, point) {
document.getElementById('txtLatitude').value = point.y;
document.getElementById('txtLongitude').value = point.x;
if (marker == null) {
marker = createMarker(point, "green");
marker.enableDragging();
GEvent.addListener(marker, "drag", function() {
document.getElementById('txtLatitude').value = marker.getPoint().y;
document.getElementById('txtLongitude').value = marker.getPoint().x;
( run in 0.588 second using v1.01-cache-2.11-cpan-49f99fa48dc )