|
Application WEB & IngresVisualisierung geografischer Informationen |
Next page
Page 2/4 |
|
Connect your database to Map providers First method: Select address info from the database, call <iframe> to display map
example code:
#!/usr/bin/ksh
cat << eod
Content-Type: text/html
<html>
<title>Google Map & Database</title>
<body>
eod
# INGRES DATA Extraction
sqlexp $ADR_DATABASE -t -quel $verbose << ! |
SELECT first 1 style , first_name , last_name , street , zip_code , city , country FROM gview_addresses
!
awk '
BEGIN { FS = "\t" }
{
printf "%s %s %s, %s, %s %s, %s\n", $1,$2,$3,$4,$5,$6,$7
printf "<iframe src=\"http://rubisweb.ch/online/gview/gmap_1_db?
q=%s, %s %s, %s\" width=\"100%25\" height=\"80%25\" align=\"left\" scrolling=\"no\" frameborder=\"0\"></iframe>\n",
$4,$5,$6,$7
} '
cat << eod
</body>
</html>
eod
generates following html:
<html> <title>Google Map & Database</title> <body> Herr Manfred Meyer, Ziegelgasse 4, 69117 Heidelberg, Germany <iframe src="http://rubisweb.ch/online/gview/gmap_1_db?q=Ziegelgasse 4, 69117 Heidelberg, Germany" width="100%25" height="80%25" align="left" scrolling="no" frameborder="0"></iframe> </body> </html> |
||