The Child and Maternal Health Observatory (ChiMat) is a national Public Health Observatory established to provide wide-ranging, authoritative data, evidence and practice related to children’s, young people’s and maternal health.
This specialist observatory is part of the Yorkshire and Humber Public Health Observatory (YHPHO)
David Wells, Deputy Director and Local Network Lead, ChiMat says that the basic concept behind the observatory was to make intelligence more readily available to commissioners for child and maternal health services.
Welcome to this week’s video tutorial.
Today I would like to show you, how you can activate tooltips and labels for your contextual layers.
In this example report that you can see on the screen, I have two contextual layers included, one for Towns and one for Local Authorities.
I would like to have a tooltip for the towns where I can see the town name when I hover with my mouse pointer over one of these points in the map.
To do this, I need to open the config.xml file of this report in the InstantAtlas Designer. I click on the map to open the map properties. I drag this divider a bit to the left to see all property names fully.
Towards to bottom of the list I find the property ‘List of Layers Displaying Tips’. This property requires me o type in the ID of the contextual layer for which I would like to enable the tooltip.
The ID of the layers can be found in another file called map.swf.xml. If you open this fine in a text editor I can see an entry for my base layers, my contextual layers and my background mapping layer. Each of the layers has an ID which I can simply copy out of this file. The ID for the Town layer is ‘contextualLayer2’.
I paste this ID into the configuration property and click ‘OK’. If I now save my changes and refresh the report in my browser, I can see the tooltips appear when I hover over the town points.
Activating static labels for my map layers is as easy as enabling tooltips. I go back into the Designer and enter the ID of the layer or layers into the property ‘List of Layers Displaying Labels’. This time I will activate labels for both contextual layers. So I add two rows and enter the IDs of both layers. They are ‘contextualLayer1’ and ‘contextualLayer2’. I save my changes again and refresh the browser.
The labels appear, however it looks a bit messy in the map. To work around this I can define zoom ranges in which the labels of each layer appear using the property ‘List Of Display ranges for labelled Layers’. This property requires ranges of percentage values of the starting map width. So for example I would like my Local Authorities to only show labels between the zoom to full extent and zoomed to 50% of the original map width. Then I would like the labels of my Town layers to appear.
So the values I need to put into this property are ‘100-50’ and ’50-0’.
I click ‘OK’, save my changes again and refresh the report. Initially I see only the labels of the Local Authorities. When I zoom in, however, these labels disappear and the Towns names show instead.
The content of the tooltips and labels is the value of the Feature Name Field that I chose when I added the layer into the InstantAtlas Publisher. However, this is only the case if the report was published with version 6.5 or later. Prior to 6.5 the tooltip and labels picked up the Feature Code Field of the contextual layer. So if you do not see the desired values in the tooltips or labels, you should make sure that firstly the values you wish to see are included in an attribute field in the digital map file used to create this contextual layer and secondly that you have chosen this field as the Feature Name Field in the InstantAtlas Publisher when adding the layer.
I hope this little video gives you an idea how tooltips and labelling of contextual layers work with InstantAtlas dynamic report. If you have any questions regarding this, please do not hesitate to contact firstname.lastname@example.org.