Consumers are looking for location-based apps to make their Series 40 phones smarter, easier to use, and more relevant to their mobile lives. Learn how to easily integrate Nokia Maps and services into your apps targeting Series 40 phones.
Intro – Why bother?Prereqs - What you need to get started how to get a basic map up on screen.Basic– blobs on the map - this is where the code will get started.Routing, search are included in the API
http://www.developer.nokia.com/info/sw.nokia.com/id/6bdf62e2-c739-4c29-bd9f-ddf8455f563e/JavaME.htmlFaçade Pattern - hides all the “plumbing” code - the low level connection calls, image manipulation etc. leaving a simple and consistent interface so you don’t need to reinvent the wheel.
Does all the hard bits so you don’t have to bother.
The Examples were built using Nokia SDK 1.0.The API will be integrated into Nokia SDK 2.0
If phone supports landscape, map will display as landscape.Nokia-MIDlet-App-Orientation: landscape JAD file.You will want http permission javax.microedition.io.Connector.http
Why bother? – could use alternate maps – e.g. small text “Standard Web” versions.Easter Egg maps – e.g. Low Glare “Night Mode”. Recommendation – have a fallback.
All map objects are created through the MapFactoryBalloon is the classic blob on the map. The right size for a thumb.Probably want to retain a reference to the marker. (When I Click on X do Y) getObjectsAt()Don’t make icons too small. Png for transparency.Readability of text – wouldn’t recommend it. Less is more . Use tooltip to get feedback.
All map objects are created through the MapFactoryDefault width of a line.zoomTo
Cust
All map objects are created through the MapFactoryDefault width of a line.zoomTo
Search/Places Routing make requests to online REST services, an interpret the result.Sharing is a URL minfying service for nokia maps – allows the return of an image.
Geocoding is Address to Location.Can supply hint – The Toledo problem ( two cities similar size same name) = other example Hamilton. HENCE THE NULL above!
How to get the central point of the map.
A general places search - What is there to see and do around here? A category-based places search - What restaurants are there within walking distance of here?A text based search – Is there a Chinese restaurant within walking distance?An in depth search – Is that Chinese restaurant within walking distance, open at this time of night, and is it any good?
Synchronous (obviously)
-1 is the timeout parameter
-1 is the timeout parameterThe major difference between these two methods, is that the values of the interval update and time out parameters are set in a different way. In the first example both parameters are passed as arguments to the setLocationListener() method, while in the second example, the interval value is indirectly set by forcing the running thread to sleep for the given time, and the time out parameter is passed as argument when calling the getLocation() method. When frequent location queries are needed, setting a Location Listener should be preferred compared to repeatedly calling the getLocation() method for the following reasons: a) The call to getLocation() generates screen prompts because it requires the user's permission to query the location information. The same applies for the setLocationListener() method. The difference is, that the former is called continuously within the loop, thus making it impractical to use, unless the application is signed, while the latter is called only once. Note that whether the getLocation() method requires signing, in order not to prompt for the location retrieval, depends on the permission level needed per device. Using the setLocationListener() method, ensures that there are minimal prompts without the need to sign the application among the largest set of devices possible. b) By using the setLocationListener() method, it is possible for the implementation to reuse location results if it already has a recent location result when the update is due to be delivered. This is done by passing an additional argument, the maxAge parameter that defines how old the location result is allowed to be, when the update is made. However when the application needs to retrieve the device's location only once, the getLocation() method should be preferred. This is due to simplicity in the implementation. If the setLocationListener() method was preferred in this case, some additional logic would be needed so that the location listener was replaced by another one that does not listen for location updates, as soon as a valid location has been retrieved once. Otherwise, even if the application ignored the location updates provided by the locationUpdated() method, those would still run in the background, causing increased usage of battery power.