Ejemplo n.º 1
0
$bounds = new LatLngBounds();
p($bounds->toString());
h3('isEmpty()');
p($bounds->isEmpty());
h3('extend(london, donostia, newyork)');
p($bounds->extend($london)->toString());
p($bounds->extend($donostia)->toString());
p($bounds->extend($newyork)->toString());
h3('isEmpty()');
p($bounds->isEmpty());
h3('toSpan()');
p($bounds->toSpan()->toString());
h3('toUrlValue()');
p($bounds->toUrlValue());
h3('intersects(sydney, newyork)');
p($bounds->intersects($bounds2));
h3('union(sydney, newyork)');
p($bounds->union($bounds2)->toString());
h2("LatLngBounds class: maximum bounds in GMaps");
$bounds3 = new LatLngBounds(new LatLng(-85.051128779807, -180), new LatLng(85.051128779807, 180));
h3("Constructor (new LatLng(-85.051128779807, -180), new LatLng(85.051128779807, 180))");
p($bounds3->toString());
h3("getCenter()");
p($bounds3->getCenter()->toString());
h3("getSouthWest()");
p($bounds3->getSouthWest()->toString());
h3("getNorthEast()");
p($bounds3->getNorthEast()->toString());
h3('contains(moscow)');
p($bounds3->contains($moscow));
h3('contains(sydney)');