git-svn-id: https://msi/svn/firstRepo/WebClient/branches/NewRelease@47 0f545695-f87b-41b6-9a03-7f16563b5454
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 4.8 KiB |
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -37,7 +37,7 @@
|
|||||||
<span>Blog</span>
|
<span>Blog</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="itemMenuHomeMetro <%= customClassTheme %> blogClass">
|
<div class="itemMenuHomeMetro <%= customClassTheme %> mapsClass">
|
||||||
<div>
|
<div>
|
||||||
<a href="#mapsView" data-role="none"></a>
|
<a href="#mapsView" data-role="none"></a>
|
||||||
<span>Mappa Spacciatori</span>
|
<span>Mappa Spacciatori</span>
|
||||||
|
|||||||
+40
-18
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -49,6 +50,36 @@
|
|||||||
|
|
||||||
var defaultLatLng = new google.maps.LatLng(45.4654219, 9.1859243); // Default to Milan
|
var defaultLatLng = new google.maps.LatLng(45.4654219, 9.1859243); // Default to Milan
|
||||||
var myMakers = [];
|
var myMakers = [];
|
||||||
|
var iconPM = {
|
||||||
|
url: "http://app.gruppolapastamadre.it/icon.png",
|
||||||
|
scaledSize: new google.maps.Size(24, 24)
|
||||||
|
};
|
||||||
|
|
||||||
|
function _makeMarker(ele,key){
|
||||||
|
var marker = new google.maps.Marker({
|
||||||
|
position: new google.maps.LatLng(ele.Latitudine, ele.Longitudine),
|
||||||
|
icon: iconPM,
|
||||||
|
//label: ele.Name,
|
||||||
|
title: ele.Name,
|
||||||
|
map: self.map
|
||||||
|
});
|
||||||
|
|
||||||
|
if(!myMakers[key])
|
||||||
|
myMakers[key] = [];
|
||||||
|
|
||||||
|
myMakers[key][ele.ID] = marker;
|
||||||
|
|
||||||
|
var tipopm = "";
|
||||||
|
if(ele.TipoPM==1){tipopm = "Pasta Madre Solida"} else if(ele.TipoPM==2){tipopm = 'Li.Co.Li.'}else{tipopm = 'Entrambi'}
|
||||||
|
var infowindow = new google.maps.InfoWindow({
|
||||||
|
content: '<div id="content"><div id="siteNotice"></div><h3 id="firstHeading" class="firstHeading"> ' + ele.Name + '</h3><div id="bodyContent"><p><i>Località:</i> '+ ele.Indirizzo +'<br><i>Tipo di Lievito:</i> ' + tipopm + '<br><i>Contatta:</i> <a href="mailto:'+ele.Email+'">'+ ele.Email + '</a></p></div></div>'
|
||||||
|
});
|
||||||
|
|
||||||
|
marker.addListener('click', function() {
|
||||||
|
infowindow.open(self.map, marker);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
function _centerControl(controlDiv, map) {
|
function _centerControl(controlDiv, map) {
|
||||||
var self = this;
|
var self = this;
|
||||||
// Set CSS for the control border.
|
// Set CSS for the control border.
|
||||||
@@ -181,25 +212,16 @@
|
|||||||
type: 'GET',
|
type: 'GET',
|
||||||
success: function (resp) {
|
success: function (resp) {
|
||||||
resp.forEach(function(ele, index){
|
resp.forEach(function(ele, index){
|
||||||
if(!myMakers["|" + ele.Latitudine+ "|" + ele.Longitudine+ "|"])
|
var key = "|" + ele.Latitudine+ "|" + ele.Longitudine+ "|";
|
||||||
|
if(!myMakers[key])
|
||||||
{
|
{
|
||||||
var marker = new google.maps.Marker({
|
self._makeMarker(ele, key);
|
||||||
position: new google.maps.LatLng(ele.Latitudine, ele.Longitudine),
|
}
|
||||||
icon: iconPM,
|
else if(!myMakers[key][ele.ID])
|
||||||
//label: ele.Name,
|
{
|
||||||
title: ele.Name,
|
ele.Latitudine = parseFloat(ele.Latitudine) + (Math.random() / 500);
|
||||||
map: self.map
|
ele.Longitudine = parseFloat(ele.Longitudine) + (Math.random() / 500);
|
||||||
});
|
self._makeMarker(ele, key);
|
||||||
myMakers["|" + ele.Latitudine+ "|" + ele.Longitudine+ "|"] = marker;
|
|
||||||
var tipopm = "";
|
|
||||||
if(ele.TipoPM==1){tipopm = "Pasta Madre Solida"} else if(ele.TipoPM==2){tipopm = 'Li.Co.Li.'}else{tipopm = 'Entrambi'}
|
|
||||||
var infowindow = new google.maps.InfoWindow({
|
|
||||||
content: '<div id="content"><div id="siteNotice"></div><h3 id="firstHeading" class="firstHeading"> ' + ele.Name + '</h3><div id="bodyContent"><p><i>Località:</i> '+ ele.Indirizzo +'<br><i>Tipo di Lievito:</i> ' + tipopm + '<br><i>Contatta:</i> <a href="mailto:'+ele.Email+'">'+ ele.Email + '</a></p></div></div>'
|
|
||||||
});
|
|
||||||
|
|
||||||
marker.addListener('click', function() {
|
|
||||||
infowindow.open(self.map, marker);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user