25 Kwi 2013

Proste dodawanie markera

var position = new google.maps.LatLng(lat,lng);
var markerOptions = {
position:position,
// draggable:true,
map:map,
title:'Tytuł'
};
var marker = new google.maps.Marker(markerOptions);
28 Cze 2010

Przygotownie boxa w obrębie punktu

var marker = new GMarker(point,{title: address});
map.addOverlay(marker);

boxes=[];
boxes[0]=
new google.maps.LatLngBounds(
new google.maps.LatLng(point.lat()-dist*0.01,point.lng()-dist*0.02),
new google.maps.LatLng(point.lat()+dist*0.01,point.lng()+dist*0.02)
);
11 Mar 2009

Zapytanie o miasta w okolicy

$latlng = array(51.9, 19.1);

if($latlng) {
 list($lat, $lng) = $latlng;
 $r  = 0.3;
 $sql_where_array[] = 'lat < '.($lat + $r).' and lat > '.($lat - $r).' and lng < '.($lng + $r).' and lng > '.($lng - $r);
}

if($sql_where_array)
 $sql_where = ' where ' . implode(' AND ', $sql_where_array);
$sql = 'select name from Cities '.$sql_where . ' ORDER BY name asc';