Reinos.nl internet media examples

Geocoder template IP-Based

Maps 5.0.1 Live

The geocoder tag with ips="CURRENT_IP": the location of the visitor, found by the IP address, with all the geocoding variables.

Template
{exp:reinos_maps:geocoder
    ips="CURRENT_IP"
}
  {result}
    <ul>
      <li><b>latitude :</b> {latitude}</li>
      <li><b>longitude :</b> {longitude}</li>
      <li><b>bounds :</b>
        <ul>
          {bounds}
            <li><b>south :</b> {south}</li>
            <li><b>west :</b> {west}</li>
            <li><b>north :</b> {north}</li>
            <li><b>east :</b> {east}</li>
          {/bounds}
        </ul>
      </li>
      <li><b>admin_levels :</b>
        <ul>
          {admin_levels}
            <li><b>level :</b> {level}</li>
            <li><b>name :</b> {name}</li>
            <li><b>code :</b> {code}</li>
          {/admin_levels}
        </ul>
      </li>
      <li><b>street_name :</b> {street_name}</li>
      <li><b>street_number :</b> {street_number}</li>
      <li><b>city :</b> {city}</li>
      <li><b>zipcode :</b> {zipcode}</li>
      <li><b>city_district :</b> {city_district}</li>
      <li><b>country :</b> {country}</li>
      <li><b>country_code :</b> {country_code}</li>
      <li><b>timezone :</b> {timezone}</li>
    </ul>
  {/result}
{/exp:reinos_maps:geocoder}

Build it in your own site

What this example needs in ExpressionEngine, step by step.

  1. Install Maps.
  2. Put the code in a template.

This example comes from the Maps docs: the preview runs exactly the code above.