×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    May 2013
    Posts
    1

    Question Changing route color

    Hi,

    I'm trying to change the route (line) color from the result set of Route.fetch - is there a possibility to do this?

    So far I've only succeeded to change the color when I draw my own shape (like this):

    Code:
    map.route = [{color: "rgba(0,191,255,0.75)", shape: [49.874781, 8.657052, 49.87915, 8.670012, 49.883547, 8.657524]}];
    ..but not by using it with Route.fetch (for one example, I've tried various ways):

    Code:
    nokia.mh5.adapters.Route.fetch(waypoints,
            {mode: "drive"}, function(result) {
    		waypoints.forEach(function(wayPoi) {
    			//map.pois = waypoints;
    			map.route = result.shape;
    			map.box = result.box;
    		});
    		map.route.color = "rgba(0,191,255,0.75)";
            }, function(error) {
    		console.log("Erorr ", error);
            });
    Maybe there is a way to set the style for new routes globally?

    Thanks,
    acidicX

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2012
    Posts
    65

    Re: Changing route color

    Hi acidicX,

    have you tried:
    Code:
    nokia.mh5.adapters.Route.fetch(waypoints,
            {mode: "drive"}, function(result) {
    			map.route = {
                                   shape: result.shape,
                                   color: "rgba(0,191,255,0.75)"
                            };
    			map.box = result.box;
            }, function(error) {
    		console.log("Erorr ", error);
            });
    Br,
    Leo

Similar Threads

  1. Changing Font color
    By suraj03 in forum Mobile Java General
    Replies: 1
    Last Post: 2012-02-17, 07:28
  2. Changing Font and Color
    By nmnir3 in forum Symbian
    Replies: 0
    Last Post: 2010-12-24, 12:05
  3. changing color
    By amitagrawal78 in forum Symbian User Interface
    Replies: 1
    Last Post: 2002-10-04, 13:48
  4. Changing the color of GUI components
    By sebu1234567890 in forum Symbian
    Replies: 1
    Last Post: 2002-08-22, 11:16
  5. changing color of link
    By arunoday in forum Browsing and Mark-ups
    Replies: 1
    Last Post: 2002-08-20, 12:56

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •