Skip to content

Latest commit

 

History

History
216 lines (150 loc) · 7.17 KB

SETUP.md

File metadata and controls

216 lines (150 loc) · 7.17 KB

Setting up the MapService Server

Requirements

Before you get started, make sure you have the following dependencies installed on your machine:

Database

The server can use one of the follwing database system

  1. IBM Cloudant
  2. MongoDB at localhost

Deploy MapService Server

After you setup Eclipse, you have the following options to deploy server.

  1. Define IBM Bluemix Server. Then push MapService app to Bluemix
    Liberty for Java / Getting started tutorial
    Develop applications using IBM Eclipse Tools for IBM Cloud
    Deploying apps with IBM Eclipse Tools for IBM Cloud
    Eclipse tools for IBM Cloud
    Build and deploy a sample Liberty application to Bluemix
    Options for pushing Liberty apps

  2. Setup your own J2EE Container (WAS Liberty recommneended). Then deploy server manually.
    WebSphere Liberty

After you deploy MapService Server, you need to add a DB service

  • If you are not using Bluemix, you need to provide VCAP_SERVICES Environment variable
  • If VCAP_SERVICES is not provided, it tries to connect to Mongo DB at localhost:27017

You need to add the following environment variable for administoration instances

  • ENABLE_MAP_ACCESS=admin,auditor,editor

Administration

Open https://your_app_name.mybluemix.net/admin.jsp

Please login with initial administrator account:

  • User id : hulopadmin
  • Password: please change password

Important: Please change admin password NOW!

You also need to create new editor account.

Setting Indoor Floor Map (Optional)

Create Attachment zip file with the following files:

  • map/floormaps.json file
[
	{
		"id": "<id of floor map>",
		"image": "<url of floor plan image>",
		"floor": <floor number>,
		"origin_x": <origin x>,
		"origin_y": <origin y>,
		"width": <width of image>,
		"height": <height of image>,
		"ppm_x": <pixels per meter x>,
		"ppm_y": <pixels per meter y>,
		"lat": <latitude>,
		"lng": <longitude>,
		"rotate": <rotate angle>
	},
	
	{
	    ... 
	},
	
	{
	    ... 
	}
]
  • floor plan image files.

Import Attachment zip file using Administration console

Edit Network Route

Open https://your_app_name.mybluemix.net/editor.jsp

Please login with editor account.

Testing Navigation

Use https://your_app_name.mybluemix.net/mobile.jsp?id=your_unique_device_id

Setting OpenLayers Tile Map Service

Open Street Map (OSM) is used for Tile Map Service by default. You can OSM for initial test.

However, heavy use of OSM is prohibited. See https://operations.osmfoundation.org/policies/tiles/

You need to provide your Tile Map Service via Environment Variable as follows:

HULOP_TILE_SERVER

  • URL of tile service.
  • Example: https://{a-c}.tile.example.com/{z}/{x}/{y}.png?apikey=your_api_key

HULOP_TILE_ATTR

  • Attribution information.
  • Example: Maps © <a href="http://www.example.com">Example</a>, Data © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap contributors</a>

Setting Optional Environment Variables

ENABLE_MAP_ACCESS=admin,auditor,editor (no default)

  • access right for map DB

SUPPORT_AGREEMENT=true (default: false)

  • agreement is supported at initial use

SUPPORT_QUESTION=true (default: false)

  • question is supported at initial use

EDITOR_API_KEY=key (no default)

  • API key for map edit API

AUDITOR_API_KEY=key (no default)

  • API key for logging API

ESCALATOR_WEIGHT=weight (default: 100)

  • weight for escalator route

STAIR_WEIGHT=weight (default: 300)

  • weight for stair route

ELEVATOR_WEIGHT=weight (default: 300)

  • weight for elavator route

MAX_START_PARAMS=count (default: 10000)

  • max cache count for user location

MAX_ROUTE_BEANS=count (default: 1000)

  • max cache count for route data

HULOP_VCAP_SERVICES=json (default: VCAP_SERVICE json)

  • use alternative db credential

COS_SERVICES=json (default: VCAP_SERVICE json)

  • use alternative Cloud Object Storage credential

COS_SETTINGS={"bucket_name": backet name, "endpoint_url": endpoint url, "location": location} (no default)

  • specify Cloud Object Storage bucket

HULOP_NAVI_DB=name (default: navi_db)

  • db name for MongoDB

HULOP_INITIAL_LOCATION={ "lat": latitude, "lng": longitude, "floor":floor } (default: COREDO Muromachi, no floor)

  • initial map location

HULOP_INITIAL_ZOOM=zoom (default: 19.5)

  • initial map zoom

HULOP_MAX_RADIUS=radius (default: 500)

  • max radius for loading route data

HULOP_DEFAULT_SHOW_LABELS_ZOOMLEVEL=level (no default)

  • show facility name when map zoom level >= level

HULOP_INITIAL_ROTATION_MODE=mode (default: 1)

  • initial map rotation mode (0: north up, 1: head up, 2: route up)

HULOP_DO_NOT_USE_SAVED_CENTER=true (default: false)

  • do not restore last map location

HULOP_SCREEN_FILTER_SPEED=meter per second (no default)

  • walking speed to apply screen filter

HULOP_SCREEN_FILTER_START_TIMER=second (no default)

  • seconds before start screen filter

HULOP_SCREEN_FILTER_STOP_TIMER=second (default: start / 2)

  • seconds before stop screen filter

HULOP_SCREEN_FILTER_NO_BUTTON=true (default: false)

  • do not show screen filter disable button

ACCEPT_IP_ADDRESS=Regular expression (no default)

  • Allow administration access only from certain IP Address

SERVICE_TIME_DIFF=UTC time offset in minutes (no default)

  • set this value to apply service limitation date and time on route search