Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Archived:Update Nokia Online Maps Style for Asha Full Touch

From Wiki
Jump to: navigation, search
Article Metadata
Created: r60600 (08 Aug 2012)
Last edited: hamishwillee (09 May 2013)

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

This article uses a deprecated version of the Nokia Maps API for JavaScript to display a Map on a Java ME device. The Nokia Maps API for JavaScript is not considered to be an appropriate API to use in the Java ME environment, as a large JavaScript library would need to be regularly downloaded onto a memory constricted device, and un-cached Map tiles would need to be regularly requested which would result in a large amount of data traffic.

Nokia offers two alternative APIs which are more suitable for Java ME development

  • For a simple static map using the RESTful Maps API within a web widget is considered to be a reasonable lightweight solution.
  • For dynamic mapping use cases, the Nokia Maps API for Java ME is a Native API which would be preferred more complex development.
  • Static mapping services do not cache or tile the images when requested, therefore each request involves a round trip to the server. If the map on a mobile application needs to be refreshed at any time, using a caching library will result in a reduction in network traffic after around three maps have been displayed. An explanation of this can be found here
An article with the same functionality, written using the native Java ME API can be found in the Custom Map Views Example

Note.pngNote: This is an entry in the Asha Touch Competition 2012Q3

Nokia Maps is designed for desktop or laptop system, which can be saved as a single HTML file via IE or other browsers. Developers can also make the file as the homepage of their website or Series 40 Web App and add new style in it for corresponding devices at the same time.

Code below will reconstruct a map with basic function for Asha full touch(such as Asha 305, Asha 306, Asha 311 ).

<link type="text/css" rel="stylesheet"
/*Hide top and app bar for large display area.*/
#topbar, #nokiamaps #appbar{height:0px;visibility:hidden}
#nokiamaps #appbar div div form input{height:0;padding:0;border:0}
/*Adjust the map's size and location.*/
#nokiamaps.maps #application{top:0}
/*Reduce width of the control bar.*/
.MCCBTab1 .MCTLinner,.MCCBTab2 .MCTLinner{padding-right:0}
.MCTriangle, .MCTLTabDisabled .MCTLinner .MCTriangle{visibility:hidden}
.MCTDelimiter, .MCHorizontalDelimiter{visibility:hidden}
.MCCBTabsContainer .MCTLempty{width:8px}
/*Most mobiles don't support 3D map.*/
/*Set the better location for mobiles.*/
/*No use in most mobiles.*/
/*Full touch may not have these components.*/
.MCPan, .MCZoom{visibility:hidden}
/*Too long to display.*/
<!--[if lt IE 9]>
<link type="text/css" rel="stylesheet"

Of course, the style can also be saved into a css file linked to the homepage.

Launching the app in simulator.




Nokia Online Maps is ported on handheld system with better effect.

This page was last modified on 9 May 2013, at 10:26.
94 page views in the last 30 days.