HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


ocDatamap

This is a main block, that shows a different catalogue entries locations longitude/latitude values (the names of the fields to take longitude/latitude from are configured inside block parameters). The different catalogue entries are shown as pins on a Google map. Clicking on the pin shows the catalogue entry in a little box (as a link to the entry). Example:

Code

[block title="store locater" description="This is a Store Locater" latfield="lat" longfield="long" catalogue="stores" width="100%" height="300px" api_key="ABQIAAAAh-V5j3o3WHPt4sOTCFGtZRQ1JC1QWHj5vV9F5HylUmlQDCEUThTkllgXxpxVdTRa7GNJv2FcsCeE0w" zoom="6" latitude="24.2135" longitude="-1.4654"]main_google_map[/block]
You will need to get a Google maps api key to be able to use this block, you can get this from Sign Up for the Google Maps API - Google Maps API Family - Google Code and you will need to create a catalogue with at least 1 entry which has the latitude and longitude fields filled in. You can call the fields in the catalogue latitude and longitude field anything you like and you can find the coordinates by using the option in Google Maps Labs or via Latitude and Longitude of a Point. When you add the block you see 11 block parameters to be filled in these are: Title – The Name of the block which will appear on screen (for example, Store Locater). Description – a Description of the block. Latfield – This is the field you chose in the catalogue which has all the latitude coordinates in it. Longfield – This is the field you chose in the catalogue which has all the longitude coordinates in it. Catalogue – This is the name of the catalogue you chose and want to display the pins for. Width – Defaults to 100% of the column. Height – Defaults to 300px but can be set to how ever many pixels(px) you need it to be. API key – The key which you were given Sign Up for the Google Maps API - Google Maps API Family - Google Code. Zoom – A number between 1 and 17, the higher the number the more zoomed in the map will start at. Latitude – The Latitude coordinates where you want the centre of the map to be when first loaded. Longtude – The Longitude coordinates where you want the centre of the map to be when first loaded. Please Note: the preview on this block does not work.

System Requirements / Dependencies

catalogues

License

Licensed on the same terms as ocPortal

Images