<?xml version="1.0" encoding="UTF-8"?>
<idoc title="API tutorial layer" icon="tixik.png">

    <!-- Part: Layer -->
    <layer>
        <info>
            This (example) layer shows how a layer can connect to an API. The geo data is collected from Tixik API - famous places around the world.
        </info>
        <symbolLayer name="Places" dataset="tutorial_tixik.php.igeo" webServiceFormat="igeo"/>
        <tag name="Example"/>
    </layer>

    <!-- handlers -->
    <handler id="dataloaded" action="layer.viewSelection(1); app.showMap();"/>
    <handler id="show" action="doc.fields.thex.value=map.centerX; doc.fields.they.value=map.centerY;"/>
    
    <!-- Part: Page -->
    <style fontSize="12" fontStyle="bold" alignX="middle">
        API tutorial layer
    </style>
    <br/>
    <br/>
        Search for famous places around the center of the map
    <br/>
    <br/>
    The center of the map:<br/>
    <section id="thex" title="Longitude" value="" readonly="true"/>
    <section id="they" title="Latitude" value="" readonly="true"/>
    <br/>
    <section title="Search" action="layer.load({sublayer:'Places', handler:doc.handlers.dataloaded, arg:{x:map.centerX, y:map.centerY}})"/>
    <br/>
    <section title="Visit Tixik homepage" value="http://en.tixik.com" action="app.browse('http://en.tixik.com')" readonly="true" />
</idoc>

