Sourcefabric Manuals

 English |  Español |  Français |  Italiano |  Português |  Русский |  Shqip

Newscoop 4.3 Cookbook

Map

Note: this works only in Newscoop 3.5.0 and later versions.

Requires jQuery: In order to use display maps you must include jQuery in the header of your document, with a link like this:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">

The map_ object is usually initialized by the current article in the environment (see "Article"). It is not initialized at the beginning of the template and can not be initialized by other Newscoop functions. The map_ object has the following properties:

  • name: the name given to the map
  • provider: the map provider
  • locations: a list of map locations, see the "Article Location" object
  • is_enabled: TRUE if the map is enabled, FALSE otherwise

Examples

{{ if $gimme->map->is_enabled }}
    <p>Map Name: {{ $gimme->map->name }}</p>
    <p>Map Provider: {{ $gimme->map->provider }}</p>
{{ /if }}

There has been error in communication with Booktype server. Not sure right now where is the problem.

You should refresh this page.