The purpose of the GoMap module is to display any map points on the map as
distinguished by the configuration specified through the Wizard. The
configuration value for the data source can be anything from XML to SQL, granted that it returns in the
expected format:
- ID - a standard numeric identifier of the point. This is specifically required for updates, and can simply be set to 1 for views and queries.
-
Description - the text value to place in the marker window when a point is
clicked.
-
Latitude - a float value of the Latitude of the point.
-
Longitude - a float value of the Longitude of the point.
-
IconIndex - an integer value cooresponding to the icon index set up in the list
of icons in the module settings.
-
Timer - an integer value which assists in the animation of the playback
feature. In the sample the Timer is calculate as the number of days between the
earliest registration record and the record in question. The view is typically
ordered by this Timer column. The animation will wait between timer values (0
through the max timer) a pause of 100 milliseconds. Effectively showing a
timeline progression in days.
-
TimerInfo - the text value to place in the title/alt tag of the start, end and
scroller images in the timeline - our sample shows the registration date.
-
Zoom - the Zoom column provides the ability to provide summary points to be placed at different levels of zoom, meaning, when a user Zooms in beyond a predefined Zoom level, they see points at the next level. For example, you may define points at zoom 11, and at zoom 0. If the user zooms from 11 or greater, all 11's are visible. If they zoom to a level less than 11, all 0's are visible.
The provided defaults act as both a practical, and highly consumable, example of
how to integrate data with the GoMap module. The defaults mimic the
popular UsersOnline data, showing the most recent, new today, new
yesterday, overall icons but extends the idea by seperating them by
country/region.
In order for the default to work in an appropriate fashion two requirements are
addressed by the installation -
-
Countries and Regions are available to the queries of the Profile information
for each user within the DNN installation, but the physical position of those
places on the map needed to be defined.
-
With a physical definition and mapping of regional information to longitude and
latitude, the querying of the data needs to be as optimal as possible. This
means that the mapping of the longitude and latitude information cannot rely on
the storage mechanics utilized for the DotNetNuke profiles - since it is not
highly indexable is not optimal for frequenty queries.
The defaults provided for GoMap address both of these requirements as follows,
and define the reasoning behind the "Add Lookup Points" menu item:
-
A new column as added to the aspnet_profile table titles GeoLookup which
identifies the precise GeoLookup identity from the GeoLookup table. This way
the binding of the Longitude and Latitude to the profile information for the
UsersOnline is immediate, quick and highly optimized.
-
A trigger is added to the GeoLookup table which forces an update on the
aspnet_profile table GeoLookup column whenever points in the geolookup table
are modified, added or removed. This recalculating the correct positioning of
the profile information whenever the GeoLookup table is trained via the Add
Lookup Points interface.
-
A trigger is also added to the aspnet_profile table which forces recalculation
of the GeoLookup for the specific profile whenever data within that profile is
changed. Therefore recomputing the GeoLookup when Country or Regional
information is modified within the profile.
-
Finally, the GeoLookup table is automatically populated with 439 distinct
points representing all world Countries. States, Provinces and Regional
abbreviations for the United States, Canada, India, Germany, France, Australia
and the United Kingdom.
When the module is requested, it executes the sample view which we provide,
which gathers the tally of users per defined region (where users are
registered), and additionally determines the appropriate icon based on the most
recent creation date in the profile table for users within that region. In
turn, this works like a charm - because the join is occuring on the ID that was
precalculated - returning instantly with the most up to date information.