1 Map with a single point

In this example, a box will be added to the client object to show its location on a map


Parameters of the main box:


Sentence used:


Copy
<select>
    <columns>
        'POINT(' || REPLACE(customer.gps_lon,',','.') || ' ' || REPLACE(customer.gps_lat, ',','.') || ')' zone
    </columns>
    <from table='customer' />
    <where>
        customer.customerid = '#customerid' 
    </where>
</select>

Parameters of the layer:


Code of the SQL statement:


Copy
<select>
    <columns>
        'POINT(' || REPLACE(customer.gps_lon,',','.') || ' ' || REPLACE(customer.gps_lat, ',','.') || ')' zone,
        1 sqlgmap_range
    </columns>
    <from table='customer' />
    <where>
        customer.customerid = '#customerid' 
    </where>
</select>

Result:



Se crea una simbologia para customizar el icono del mapa.


Header of the symbology with code 'CUSTOMER'



The icon is added in the images of the symbology



The icon is added to the range of the symbology, in this case there is only a range between -0.5 and 1.5



The map layer is modified and the symbology field is updated by CUSTOMER , the symbology that has just been created.



Result:



Label is added to the layer to appear in the legend.



Result:



Information is added in the info window of the layer so that it is shown when clicking on the point on the map.


All the variables contained in the info window must exist in the layer's statement, in this case the statement will be modified and more client data will be added.



The sentence of the layer:


Copy
<select>
    <columns>
        'POINT(' || REPLACE(customer.gps_lon,',','.') || ' ' || REPLACE(customer.gps_lat, ',','.') || ')' zone,
        1 sqlgmap_range,
        customer.firstname,
        customer.company
    </columns>
    <from table='customer' />
    <where>
        customer.customerid = '#customerid' 
    </where>
</select>

Code in the info window (accepts text or html)


Copy
<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>

It is observed that the values referenced to the sentence of the layer the symbol is used #

In the example you get the column firstname and it is the reference in the info window mwdiante #firstname


Result:



A link is added in the info window to show the employee master associated with the client


The supportrepid column is added to the sql statement of the layer.

The parameterization of the link is added:



Result: