Using MAP sample portlet
The MAP sample portlet demonstrates the following features of MAP:
- Image Conversion
- Image Cropping
- Image Scaling
The sample portlet can also be used to verify the installation of MAP. The portlet employs XDIME 2 and the image resources are accessed using the object element. This portlet requires that the MAP runtime is installed along with WebSphere
® Portal as a prerequisite.
The following image formats and resolutions can be used to test for conversion to the preferred device specific format:
- VGA – 640 x 480
- QVGA – 240 x 320
- 16thVGA – 120 x 160
The image will be transcoded from the following sources:
- Device dependant mime type
- Convertible image component
An image is cropped by specifying the upper-left corner and bottom-right corner of the area that is to be preserved.
- Upper-left corner: v.top.y, v.left.x
- Bottom-right corner: v.bottom.y, v.right.x
Values are specified under the following rule: 0<=v.top.y<=v.bottom.y<=1 and 0<=v.left.x<=v.right.x<=1
The aspect ratio of the image is preserved during scaling. The input parameters for specifying scaling are v.width and v.height, which refer to the output image width and height in pixels respectively. The transcoder does not scale images larger that the source by default. However, this can be overridden through the use of the v.scaleLarger URL parameter.Watermarking
A watermark can be embedded by setting the watermarkURL attribute on the watermark element. If the device can display the image without transcoding, the image is sent directly to the target device with no watermarking applied.
Setting up MAP sample portlet
This portlet supports browsers and devices that are handled by the XDIME aggregator.Server requirements
MAP must be installed on a WebSphere Application Server instance on which WebSphere Portal and Mobile Portal Accelerator are running.Deployment and installation
The MAP sample portlet is available in the Mobile Portal Toolkit samples gallery. Mobile Portal Toolkit can be used to view the source code for the portlet and to run it in WebSphere
The portlet consists of a WAR file ( wp_root/wp.mobile/wp.mobile.mwp/installableApps/MAPSample.war
By default, the MAPSample.war
is not installed during the Mobile Portal Accelerator installation.
To install the MAP sample portlet, perform the following steps:
- Log in to WebSphere Portal as administrator.
- Select Administration -> Portlet Management -> Web Modules and click Install.
- Browse to the WAR file located in the wp_root/wp.mobile/wp.mobile.mwp/installableApps and select MAPSample.war.
- Click Next, and then click Finish.
Parent topic: Installed portlets
Developing MAP portlets using XDIME
Installing the Media Access Proxy (MAP)
Configuring the MAP sample portlet
The MAP sample portlet supports the following configuration parameters:
These parameters can be modified by a portal administrator using the WebSphere
Portal Administration Portlet Management
-> Portlets configuration