1 Map with several points and layers
In this example, an object will be created to consult all the locations of the clients in a map.
The object is created:

Input parameters:

Output parameters:

A box of type SQL-Gmap is created in the form.

Parameters of the main box:

Sentence used:
<select> <columns> <geo.buffer> <geom1> <geo.aggrMbr> <geo.point2D> <coords>' || customer.gps_lon ||' ' || customer.gps_lat || '</coords> <srid>auth_srid2_srid(4)</srid> </geo.point2D> </geo.aggrMbr> </geom1> <dist>0.5</dist> </geo.buffer> </columns> <from table='customer' /> <where> $0 </where> </select>
Parameters of layer 1:
Layer that shows the location of the current client in the cursor of the object.

Code of the SQL statement
<select> <columns> 'POINT(' || REPLACE(customer.gps_lon,',','.') || ' ' || REPLACE(customer.gps_lat, ',','.') || ')' zone, customerid, 1 sqlgmap_range, customer.firstname, customer.company, customer.supportrepid </columns> <from table='customer' /> <where> customer.customerid = '#customerid' </where> </select>
Window info code:
<table border='0.5' cellpadding='2' cellspacing='2' bgcolor='grey'> <tr bgcolor='white'> <th colspan='2' bgcolor="LightBlue"><b>CUSTOMER</b></th> </tr> <tr bgcolor='white'> <th bgcolor="LightBlue"><b>Name</b></th> <th><b>#firstname</b></th> </tr> <tr bgcolor='white'> <th bgcolor="LightBlue"><b>Company</b></th> <th><b><i>#company</i></b></th> </tr> </table>
Parámetros de la capa 2:
Capa que muestra la localización del resto de clientes distintos al cliente del cursor del objeto.

Código de la sentencia SQL
<select> <columns> 'POINT(' || REPLACE(customer.gps_lon,',','.') || ' ' || REPLACE(customer.gps_lat, ',','.') || ')' zone, customerid, 1 sqlgmap_range, customer.firstname, customer.company, customer.supportrepid </columns> <from table='customer' /> <where> customer.customerid != '#customerid' AND $0 </where> </select>
Código del info window:
<table border='0.5' cellpadding='2' cellspacing='2' bgcolor='grey'> <tr bgcolor='white'> <th colspan='2' bgcolor="LightBlue"><b>CUSTOMER</b></th> </tr> <tr bgcolor='white'> <th bgcolor="LightBlue"><b>Name</b></th> <th><b>#firstname</b></th> </tr> <tr bgcolor='white'> <th bgcolor="LightBlue"><b>Company</b></th> <th><b><i>#company</i></b></th> </tr> </table>
Se añade una caja de tipo VIEW al objeto con las columnas principales del SQL inicial del objeto y de esta forma poder desplazarnos por el cursor de la sentencia principal.
Resultado:

1.1 Interacción
Pulsando sobre los registros de la vista se accede a la posición del cliente en el mapa, representado por un icono de color rojo, mientras el resto se representan en color azul.

Info window, al pulsar sobre un punto del mapa se muestra la información del mismo. en este caso además muestra un link al maestro de clientes, parametrizado previamente en links de la capa.

Resultado:
