- if you need to put indoor map in your website
- if you need to assign tenants to map drawn features in website adminstration portal and save feature_id to tenant in your database so later you can send tenants json to mobile SDKs (https://github.com/tagipedia/tmaps-ios-sample#set-tenant-data) or (https://github.com/tagipedia/tmaps-android-sample#set-tenant-data)
- Add <script src="CONTACT_US_FOR_SCRIPT"></script> to your project (Request script and map id from Tagipedia Team)
- Read our sample for examples
it works using dispatch actions between your APP and TMaps. So your APP dispatch actions to TMaps and TMaps dispatch actions to your APP.
dispatched when TMaps ready to receive dispatches from Your APP. in order to make easy integration with Web only we will not execute your dispatches until map get ready so feel free to dispatch any action before map get ready.
{
"type": "READY"
};
dispatched when map loaded and visible to user.
{
"type": "MAP_LOADED"
};
dispatched when features in map tapped.
{
"type": "FEATURES_TAPPED",
"features": features
};
features
Required Array with Object, each Object with id, properties keys
dispatched when features in map tapped with the top feature visible to user.
{
"type": "ASSOCIATED_FEATURE_TAPPED",
"feature_id": feature_id,
"feature": feature
};
feature_id
Required String with valid feature id
feature
Required Object with id, properties keys
dispatched when select category in map
{
"type": "CATEGORY_MARKED",
"category": category
};
category
Required valid String category
dispatched when error happened in TMaps
{
"type": "ERROR",
"error": error
};
error
Required Object with stack key and String value
dispatched after MARK_FEATURE ended
{
"type": "FEATURE_MARKED",
"feature_id": feature_id
};
feature_id
Required String with valid feature id
dispatched after HIGHLIGHT_FEATURE ended
{
"type": "FEATURE_HIGHLIGHTED",
"feature_id": feature_id
};
feature_id
Required String with valid feature id
dispatched after SET_ZOOM ended
{
"type": "ZOOM_ENDED"
};
dispatched after SET_CENTER ended
{
"type": "CENTER_ENDED"
};
dispatch it to set tenants of map.
{
"type": "SET_TENANT_DATA",
"payload": tenants_json
};
payload
Required Array with Object, each Object with id, feature_id, name, booth_id, icon, CUSTOM_KEYS_YOU_NEED keys
dispatch it to change default feature popup template.
{
"type": "SET_DEFAULT_FEATURE_POPUP_TEMPLATE",
"template": template,
"template_custom_data": templateCustomData,
};
template
Required valid String angular template with PopupScope
template_custom_data
Optional Object with CUSTOM_KEYS_YOU_NEED keys and String, Number, Array, Object values
template custom data of keys that you want to use from customData in PopupScope
dispatch it to change theme of map.
{
"primary": primary_color,
"accent": accent_color
};
primary
Optional valid String color
accent
Optional valid String color
dispatch it to load map.
{
"type": "LOAD_MAP",
"map_id": map_id,
"theme": {
"primary": primary_color,
"accent": accent_color
},
"center": [lng, lat],
"zoom": zoom
};
map_id
Required String
theme
Optional Object with primary, accent keys and valid String color values
theme used for colors such as buttons and loading
center
Optional Array of Numbers
Default map center in longitude and latitude
zoom
Optional Number
Default zoom level
dispatch it to change render mode.
{
"type": "CHANGE_RENDER_MODE",
"modeToRender": modeToRender
}
modeToRender Required String with 2D, 3D
dispatch it to change zoom of map.
{
"type": "SET_ZOOM",
"zoom": zoom,
"zoom_type": zoom_type,
}
zoom Required Number
zoom_type Optional String with FLY_TO
dispatch it to change center of map.
{
"type": "SET_CENTER",
"center": [lng, lat],
}
center Required Array of Numbers Default map center in longitude and latitude
dispatch it to highlight feature.
{
"type": "HIGHLIGHT_FEATURE",
"feature_id": feature_id
}
feature_id Required String with valid feature id
dispatch it to mark feature.
{
"type": "MARK_FEATURE",
"feature_id": feature_id
}
feature_id Required String with valid feature id
current feature
poi
poi Required poi
Boolean to check if routing is enabled
enableRouting
method to show routing dialog.
showRoutingDialog($event, data)
$event Required $event
data Optional Object with from, to keys and poi value
method to call Angular $apply
applyIfneeded(callback)
callback Required Function
custom data object that have all keys of template_custom_data
customData[key]
key Required with valid key from template_custom_data
method to dispatch action from your APP to TMaps.
dispatch(action)
action Required Object with valid action
method to dispatch action from TMaps to your APP.
dispatchToContainer(action)
action
Required Object with type, CUSTOM_KEYS_YOU_NEED keys.
type is String value.
CUSTOM_KEYS_YOU_NEED is any of String, Number, Array, Object values.
method to close feature popup
closeInfo()
id of feature
poi.id
category of feature
poi.category
tags of feature
poi.tags
tenant of feature you set in SET_TENANT_DATA
poi.getTenant()
tenant name of feature you set in SET_TENANT_DATA
poi.getTenantName()
tenant icon of feature you set in SET_TENANT_DATA
poi.getTenantIcon()
tenant booth_id of feature you set in SET_TENANT_DATA
poi.getTenantBoothId()
getTenantName or feature name
poi.getDisplayName()
check if tenant or feature have name.
poi.hasName()
check if feature is building.
poi.isBuilding()
getTenantIcon or feature icon
poi.getIcon()
getTenantBoothId or feature booth id
poi.getBoothId()
you should dispatch HIGHLIGHT_FEATURE for initial feature after ZOOM_ENDED/CENTER_ENDED
you should dispatch HIGHLIGHT_FEATURE for initial feature after MAP_LOADED
you should dispatch SET_DEFAULT_FEATURE_POPUP_TEMPLATE for your customized template and add your custom buttons and use dispatchToContainer when button clicked to handle the click action in your APP.