var polygon;
var infowindow = new google.maps.InfoWindow({});
function RistoCount(polygon, contoMarkers) {
//console.log (polygon[0].k) ;
//alert (ne);
//alert (sw);
///iniziamo a contatre i risto nel polygon
var polyCoords = [
new google.maps.LatLng(41.8800711,12.5059979),
new google.maps.LatLng(41.8800711,12.5659979),
new google.maps.LatLng(41.9400711,12.5659979),
new google.maps.LatLng(41.9400711,12.5059979),
];
//
var ActiveRect = new google.maps.Polygon({
paths: polyCoords //coodinate fisse iniziali
//paths: polygon //coodinate aggiornate al cambio
});
//console.log (ActiveRect);
//console.log (data); //elenco dei ristoranti in mappa
alert(contoMarkers);
// from http://jsfiddle.net/7wLWe/1/
pos = new google.maps.LatLng( polygon[0].k , polygon[0].B);
var mapLabel = new MapLabel({
text: contoMarkers + ' Risto in Area',
//position: pos ,
map: map,
fontColor: 'orange',
fontSize: 18,
align: 'left'
});
mapLabel.set('position', pos);
}
function initialize() {
var map = new google.maps.Map(document.getElementById("map"),
{
zoom: 12,
center: new google.maps.LatLng(41.9100711,12.5359979,11),
mapTypeId: google.maps.MapTypeId.HYBRID
});
var polyCoords = [
new google.maps.LatLng(41.8800711,12.5059979),
new google.maps.LatLng(41.8800711,12.5659979),
new google.maps.LatLng(41.9400711,12.5659979),
new google.maps.LatLng(41.9400711,12.5059979),
];
polygon = new google.maps.Polygon({
paths: polyCoords,
strokeColor: "#0000FF",
strokeOpacity: 0.8,
strokeWeight: 2,
fillColor: "#0000FF",
fillOpacity: 0.26
});
polygon.setMap(map);
var bounds = new...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.