我需要確保用於在Google地圖上繪製線條的LatLng的值,因爲我有一些我曾經做過的工作,我不想讓任何人拷貝它。谷歌地圖 - 保護LatLng的價值
用於繪製線條的點可以讓任何人看到它並複製它,否則它最終會被保護?
我畫的線條在Ajax調用成功功能:
var position = new google.maps.LatLng(x, y);
var myOptions = {
zoom: 11,
center: position,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(
document.getElementById("googlemap"),
myOptions);
$.ajax({
type: "GET",
dataType: "json",
url: url,
success: function (data) {
$.each(data, function() {
$.each(this, function (index, Segment) {
$.each(Segment, function() {
for (var i = 0; i < Segment.X.length - 1; i++) {
var line = new google.maps.Polyline({
path: [new google.maps.LatLng(Segment.Y[i], Segment.X[i]), new google.maps.LatLng(Segment.Y[i + 1], Segment.X[i + 1])],
strokeColor: color,
strokeOpacity: 1.0,
strokeWeight: 2,
map: map
});
}
});
});
});
}
});
原來是點可複製的事實,它在客戶端繪製的?
所以在我的情況下,我如何保護json文件,以便只有我可以得到結果 – mhyassin