Configuration Information

The portlet has one property file: configuration.properties and one map file: map.json

Configuration, customization, and administration

  • 1.0.0-M4+: map URL protocol is dynamic (https if needed), map URL can be relative (e.g. /data/map.json) and prefix constructed accordingly
  • 1.0.0-M3+: Default starting map location (latitude and longitude) are obtained from (in order of priority):  portlet preference, json data file, else default value.
  • 1.0.0-M2 and before:  Default starting map location (latitude and longitude) are obtained from (in order of priority):  portlet preference, else default value.

src/main/resources/configuration.properties

  • If need be, adjust the url to the map file (defaults to http://localhost:8080/MapPortlet/data/map.json)

webapp/data/map.json

  • 1.0.0-M3 and later:  change the "defaultLocation" geocode for the default location to display when the map is displayed.  As an alternate, you can set latitude and longitude portlet preferences.
  • Add "locations" geocode data for sites on your campus.  You can specify any of the following data elements for each location.  See the map.json file in the project for examples:
FieldDescription

latitude

latitude of location
longitudelongitude of location
nameName of location.  Displayed to user and available in searches
abbreviationAbbreviation of location.  Displayed to user and available in searches
addressPostal address of location
descriptionDescription to display to users when location is selected
imgURL of image to display to user
searchTextDo not specify.  Field is constructed from name and abbreviation
searchKeysList of additional strings included in user searches
categoriesList of categories for 'Browse by category' function.
campuses 
  • NOTE:  The json file is cached by the portlet for 2 minutes, and on the client browser for 6 minutes (by default) so changes to the json file will reflect in subsequent requests after that.

portlet preferences

You can specify the following portlet preferences to override default values when you create a portlet in the portal:

Preference NameDefaultDescription
apiKey API key to use for Google Maps
latitude41.300937Latitude to display for initial map view
longitude-72.932103Longitude to display for initial map view
zoom17 
mapTypeControltrue 
panControlfalse 
zoomControltrue 
streetViewtrue 
scaleControltrue 
rotateControlfalse 
overviewControlfalse 

Maps Portlet extension and integration

Technical implementation details