Question

// Update the radius when the user makes a selection.
google.maps.event.addDomListener(document.getElementById('radius'),
    'change', function() {
       var meters = parseInt(this.value, 10);
       layer.setOptions({
         query: {
           select: locationColumn,
           from: tableId,
           where: 'ST_INTERSECTS(Latitude, ' +
               'CIRCLE(LATLNG(53.337638, -6.266971), ' + meters + '))'
          }
       });
       circle.setRadius(meters);
       //alert(position);
       //circle.setCenter(new google.maps.LatLng(position));
});

Je veux changer le (53.337638, -6.266971) pour être une «position» variable, la position a le même type de valeur avec (x, y), mais cela ne fonctionne pas avec où: «ST_INTERSECTS (Latitude,« + »cercle (Latlng ('+ position +'), '+ mètres +')) 'Comment puis-je modifier le code?

Pas de solution correcte

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top