<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<span class="hps" style="color: rgb(51, 51, 51); font-family: arial,
sans-serif; font-size: 16px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">Hi,</span><span style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); display: inline !important; float: none; "><span
class="Apple-converted-space"> <br>
</span></span><span class="hps" style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">I'm creating</span><span style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); display: inline !important; float: none; "><span
class="Apple-converted-space"> </span></span><span class="hps"
style="color: rgb(51, 51, 51); font-family: arial, sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">an application</span><span style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); display: inline !important; float: none; "><span
class="Apple-converted-space"> </span></span><span class="hps"
style="color: rgb(51, 51, 51); font-family: arial, sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">in php language</span><span style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">.</span><br style="color: rgb(51, 51, 51); font-family:
arial, sans-serif; font-size: 16px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">
<span style="color: rgb(51, 51, 51); font-family: arial, sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); display: inline !important; float: none; "></span><span
class="hps" style="color: rgb(51, 51, 51); font-family: arial,
sans-serif; font-size: 16px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">I'm using</span><span style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); display: inline !important; float: none; "><span
class="Apple-converted-space"> </span></span><span class="hps"
style="color: rgb(51, 51, 51); font-family: arial, sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">PHP</span><span class="atn" style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">-</span><span style="color: rgb(51, 51, 51); font-family:
arial, sans-serif; font-size: 16px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">MapScript</span><span style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">,</span><span style="color: rgb(51, 51, 51); font-family:
arial, sans-serif; font-size: 16px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); display: inline !important; float: none; "><span
class="Apple-converted-space"> </span></span><span class="hps"
style="color: rgb(51, 51, 51); font-family: arial, sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">PostGIS</span><span style="color: rgb(51, 51, 51);
font-family: arial,sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; background-color: rgb(245, 245, 245); display:
inline ! important; float: none;"><span
class="Apple-converted-space"> </span></span><span class="hps"
style="color: rgb(51, 51, 51); font-family: arial, sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">for</span><span style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); display: inline !important; float: none; "><span
class="Apple-converted-space"> </span></span><span class="hps"
style="color: rgb(51, 51, 51); font-family: arial, sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">query</span><span style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); display: inline !important; float: none; "><span
class="Apple-converted-space"> </span></span><span class="hps"
style="color: rgb(51, 51, 51); font-family: arial, sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">for a</span><span style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); display: inline !important; float: none; "><span
class="Apple-converted-space"> </span></span><span class=""
style="color: rgb(51, 51, 51); font-family: arial,sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-indent: 0px; text-transform: none; white-space:
normal; widows: 2; word-spacing: 0px; background-color: rgb(245,
245, 245);">queryByPoint</span><span style="color: rgb(51, 51,
51); font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); display: inline !important; float: none; "><span
class="Apple-converted-space"> </span></span><span class="hps"
style="color: rgb(51, 51, 51); font-family: arial, sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">that I</span><span style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); display: inline !important; float: none; "><span
class="Apple-converted-space"> </span></span><span class="hps"
style="color: rgb(51, 51, 51); font-family: arial, sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">must</span><span style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); display: inline !important; float: none; "><span
class="Apple-converted-space"> </span></span><span class="hps"
style="color: rgb(51, 51, 51); font-family: arial, sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">return information</span><span style="color: rgb(51, 51,
51); font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); display: inline !important; float: none; "></span><span
class="hps" style="color: rgb(51, 51, 51); font-family: arial,
sans-serif; font-size: 16px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); "> formatted</span><span style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); display: inline !important; float: none; "><span
class="Apple-converted-space"> </span></span><span class="hps"
style="color: rgb(51, 51, 51); font-family: arial, sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">text/</span><span style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); display: inline !important; float: none; "><span
class="Apple-converted-space"></span></span><span class="hps"
style="color: rgb(51, 51, 51); font-family: arial, sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">html but</span><span style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); display: inline !important; float: none; "><span
class="Apple-converted-space"> </span></span><span class="hps"
style="color: rgb(51, 51, 51); font-family: arial, sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">the query result</span><span style="color: rgb(51, 51,
51); font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); display: inline !important; float: none; "><span
class="Apple-converted-space"> </span></span><span class="hps"
style="color: rgb(51, 51, 51); font-family: arial, sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">is 0</span><span style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">.</span><br style="color: rgb(51, 51, 51); font-family:
arial, sans-serif; font-size: 16px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">
<span style="color: rgb(51, 51, 51); font-family: arial, sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); display: inline !important; float: none; "></span><span
class="hps" style="color: rgb(51, 51, 51); font-family: arial,
sans-serif; font-size: 16px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">This</span><span style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); display: inline !important; float: none; "><span
class="Apple-converted-space"> </span></span><span class="hps"
style="color: rgb(51, 51, 51); font-family: arial, sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">is the code</span><span class="" style="color: rgb(51, 51,
51); font-family: arial,sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; background-color: rgb(245, 245, 245);">:<br>
<br>
<?php<br>
require_once("includes/config.inc.php");<br>
function pixelToGeo($map,$x,$y) {<br>
# Convert x,y pixel values to georeferenced coords. Returns a
pointObj.<br>
$minx = $map->extent->minx;<br>
$miny = $map->extent->miny;<br>
$maxx = $map->extent->maxx;<br>
$maxy = $map->extent->maxy;<br>
<br>
$dx = $maxx - $minx;<br>
$dy = $maxy - $miny;<br>
<br>
$width = $map->width;<br>
$height = $map->height;<br>
<br>
$dxpp = (double)$dx/$width;<br>
$dypp = (double)$dy/$height;<br>
<br>
$geox = $minx + $dxpp*$x;<br>
$geoy = $maxy - $dypp*$y;<br>
<br>
$pointObj = ms_newPointObj();<br>
$pointObj->setXY($geox,$geoy);<br>
<br>
return $pointObj;<br>
}<br>
function FindPoint($point,$map,$radius, $layerName) {<br>
$qlayer = $map->getLayerByName($layerName);<br>
$check=$qlayer->queryByPoint($point, MS_MULTIPLE, $radius);<br>
$image=$map->drawQuery();<br>
if($check == MS_FAILURE){<br>
echo "<br><font size=4 color=red>There were no
results</font><br>";<br>
}else {<br>
$qlayer->open();<br>
$numResults = $qlayer->getNumResults();<br>
echo "<br>Result Query= ".$numResults."<br>";<br>
if ($numResults != 0) {<br>
for ($i = 0; $i < $numResults; $i++) {<br>
$query_result = $qlayer->getResult($i);<br>
$shape =
$qlayer->getShape($query_result->tileindex,
$query_result->shapeindex);<br>
$Lista_ele[]=$shape->values;<br>
}<br>
} else {<br>
$valido =0; <br>
$Lista_ele = "";<br>
}<br>
$qlayer->close(); <br>
return $Lista_ele;<br>
}<br>
} // end FindPoint <br>
<br>
$mapfile_image_width=$_GET["WIDTH"];<br>
$mapfile_image_height=$_GET["HEIGHT"];<br>
$folderCache=$_GET["idf"];<br>
$layerName=$_GET["layer"];<br>
$SRID=$_GET["SRS"];<br>
<br>
$x=$_GET["X"];<br>
$y=$_GET["Y"];<br>
$BBOX=explode(",",$_GET["BBOX"]);<br>
$ms_imagepath=DIR_FOLDER;<br>
$ms_imageurl=URL_FOLDER;<br>
<br>
$map = ms_newMapObj('');<br>
<br>
$map->outputformat->set('driver','imagemap');<br>
$map->outputformat->set('mimetype','text/html;
driver=imagemap');<br>
<br>
$map->set('width',$mapfile_image_width);<br>
$map->set('height',$mapfile_image_height);<br>
$map->web->set('imagepath',$ms_imagepath);<br>
$map->web->set('imageurl',$ms_imageurl);<br>
<br>
$latlongProj = ms_newProjectionObj("EPSG:".$SRID);<br>
$utmProj = ms_newProjectionObj("EPSG:900913");<br>
$poPoint = ms_newpointobj();<br>
$poPoint->setXY($BBOX[0], $BBOX[1]);<br>
$poPoint->project($utmProj, $latlongProj);<br>
$xmin=$poPoint->x;<br>
$ymin=$poPoint->y;<br>
$poPoint = ms_newpointobj();<br>
$poPoint->setXY($BBOX[2], $BBOX[3]);<br>
$poPoint->project($utmProj, $latlongProj);<br>
$xmax=$poPoint->x;<br>
$ymax=$poPoint->y;<br>
$map->setextent($xmin, $ymin, $xmax, $ymax);<br>
<br>
echo "<br>BBOX = ".$xmin.", ".$ymin.", ".$xmax.",
".$ymax."<br>";<br>
<br>
// Add the only one layer.<br>
$layer = ms_newLayerObj($map);<br>
$layer->setConnectionType(MS_POSTGIS);<br>
$layer->set('name',$layerName);<br>
$layer->set('type',MS_LAYER_POLYGON);<br>
$layer->set('status', MS_ON);<br>
$layer->set('connection', "host=xxx port=xxx dbname=xxx
user=xxx password=xxx");<br>
$layer->set('data','the_geom from (select * from
'.$layerName.') as foo using unique gid using SRID='.$SRID);<br>
$layer->set("template", "");<br>
$layer->set("dump", "true");<br>
<br>
// Add some colors.<br>
$class = ms_newClassObj($layer);<br>
$style = ms_newStyleObj($class);<br>
$style->color->setRGB(0, 255, 255);<br>
$style->outlinecolor->setRGB(255, 255, 0);<br>
<br>
$image = $map->draw();<br>
$map->preparequery();<br>
$point = ms_newpointobj();<br>
$point->setXY($x,$y);<br>
$geo_point = pixelToGeo($map,$point->x,$point->y);<br>
<br>
echo "POINT TO CLICK = ".$geo_point->x. " , ".$geo_point->y;<br>
<br>
print_r( FindPoint($geo_point,$map,-1, $layerName));<br>
?><br>
My result is:<br>
</span><span style="color: rgb(0, 0, 0); font-family: 'Times New
Roman'; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: normal; orphans: 2;
text-align: -webkit-auto; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
font-size: medium; display: inline !important; float: none; ">BBOX
= 2395177.6101675, 4571367.7734744, 2612958.1665649,
4679392.0513538</span><br style="color: rgb(0, 0, 0); font-family:
'Times New Roman'; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; font-size: medium; ">
<span style="color: rgb(0, 0, 0); font-family: 'Times New Roman';
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: normal; orphans: 2;
text-align: -webkit-auto; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
font-size: medium; display: inline !important; float: none; ">POINT
TO CLICK = 2470361.0341494 , 4612710.2888501</span><br
style="color: rgb(0, 0, 0); font-family: 'Times New Roman';
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: normal; orphans: 2;
text-align: -webkit-auto; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
font-size: medium; ">
<font style="font-family: 'Times New Roman'; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; " color="red" size="4">There were
no results</font><br>
<div class="moz-signature"><br>
<br>
<span class="hps" style="color: rgb(51, 51, 51); font-family:
arial, sans-serif; font-size: 16px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align:
-webkit-auto; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
background-color: rgb(245, 245, 245); ">What's wrong</span><span
class="" style="color: rgb(51, 51, 51); font-family: arial,
sans-serif; font-size: 16px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">? </span><br>
<span class="hps" style="color: rgb(51, 51, 51); font-family:
arial, sans-serif; font-size: 16px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align:
-webkit-auto; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
background-color: rgb(245, 245, 245); ">All</span><span
style="color: rgb(51, 51, 51); font-family: arial, sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); display: inline !important; float: none; "><span
class="Apple-converted-space"> </span></span><span class="hps"
style="color: rgb(51, 51, 51); font-family: arial, sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">the examples</span><span style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: normal; orphans: 2;
text-align: -webkit-auto; text-indent: 0px; text-transform:
none; white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
background-color: rgb(245, 245, 245); display: inline
!important; float: none; "><span class="Apple-converted-space"> </span></span><span
class="hps" style="color: rgb(51, 51, 51); font-family: arial,
sans-serif; font-size: 16px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">I</span><span style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: normal; orphans: 2;
text-align: -webkit-auto; text-indent: 0px; text-transform:
none; white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
background-color: rgb(245, 245, 245); display: inline
!important; float: none; "><span class="Apple-converted-space"> </span></span><span
class="hps" style="color: rgb(51, 51, 51); font-family: arial,
sans-serif; font-size: 16px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">found online</span><span style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: normal; orphans: 2;
text-align: -webkit-auto; text-indent: 0px; text-transform:
none; white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
background-color: rgb(245, 245, 245); display: inline
!important; float: none; "><span class="Apple-converted-space"> </span></span><span
class="hps" style="color: rgb(51, 51, 51); font-family: arial,
sans-serif; font-size: 16px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">using</span><span style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: normal; orphans: 2;
text-align: -webkit-auto; text-indent: 0px; text-transform:
none; white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
background-color: rgb(245, 245, 245); display: inline
!important; float: none; "><span class="Apple-converted-space"> </span></span><span
class="hps" style="color: rgb(51, 51, 51); font-family: arial,
sans-serif; font-size: 16px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">a mapfile</span><span style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: normal; orphans: 2;
text-align: -webkit-auto; text-indent: 0px; text-transform:
none; white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
background-color: rgb(245, 245, 245); ">,</span><span
style="color: rgb(51, 51, 51); font-family: arial, sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); display: inline !important; float: none; "><span
class="Apple-converted-space"> </span></span><span class="hps"
style="color: rgb(51, 51, 51); font-family: arial, sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">but I</span><span style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: normal; orphans: 2;
text-align: -webkit-auto; text-indent: 0px; text-transform:
none; white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
background-color: rgb(245, 245, 245); display: inline
!important; float: none; "><span class="Apple-converted-space"> </span></span><span
class="hps" style="color: rgb(51, 51, 51); font-family: arial,
sans-serif; font-size: 16px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">don't have a</span><span style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: normal; orphans: 2;
text-align: -webkit-auto; text-indent: 0px; text-transform:
none; white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
background-color: rgb(245, 245, 245); display: inline
!important; float: none; "><span class="Apple-converted-space"> </span></span><span
class="hps" style="color: rgb(51, 51, 51); font-family: arial,
sans-serif; font-size: 16px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">map file</span><span style="color: rgb(51, 51, 51);
font-family: arial, sans-serif; font-size: 16px; font-style:
normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: normal; orphans: 2;
text-align: -webkit-auto; text-indent: 0px; text-transform:
none; white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
background-color: rgb(245, 245, 245); ">.</span><br
style="color: rgb(51, 51, 51); font-family: arial, sans-serif;
font-size: 16px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">
<br>
<span style="color: rgb(51, 51, 51); font-family: arial,
sans-serif; font-size: 16px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); display: inline !important; float: none; "></span><span
class="hps" style="color: rgb(51, 51, 51); font-family: arial,
sans-serif; font-size: 16px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(245, 245,
245); ">Thanks</span><br>
_________________________________________<br>
<b>Andrea D'Aversa</b><br>
</div>
</body>
</html>