--- /dev/null
+<?php
+class Maps {
+
+ public static function img($lt,$lg,$o=[]) {
+ if (empty($o['width'])) $o['width'] = 72;
+ if (empty($o['height'])) $o['height'] = 36;
+ $o['sensor'] = empty($o['sensor']) ? 'false' : 'true';
+
+ return '<img src="http://maps.google.com/maps/api/staticmap?center='.$lt.','.$lg
+ .'&zoom=10'
+ .'&size='.$o['width'].'x'.$o['height']
+ .'&sensor='.$o['sensor'].'" />'
+ ;
+ }
+
+ public static function link($lt,$lg,$content=null) {
+ if (!isset($content)) $content = self::img($lt,$lg);
+ return '<a target="_blank" href="http://maps.google.com/?q='.$lt.','.$lg.'">'.$content.'</a>';
+ }
+
+}
+?>