HERE API show map based on the calculated route










1















I want to show a map of the calculated route (truck). How can I do that?
Currently the map showed is based on the lat&long, so not on the calculated route.



image of C# code










share|improve this question
























  • Please provide us some code on what your inputs are etc.. for us to help you better.

    – HERE Developer Support
    Nov 15 '18 at 7:28











  • I've added an image with the C# code I have at the moment

    – Adriaan
    Nov 15 '18 at 7:37















1















I want to show a map of the calculated route (truck). How can I do that?
Currently the map showed is based on the lat&long, so not on the calculated route.



image of C# code










share|improve this question
























  • Please provide us some code on what your inputs are etc.. for us to help you better.

    – HERE Developer Support
    Nov 15 '18 at 7:28











  • I've added an image with the C# code I have at the moment

    – Adriaan
    Nov 15 '18 at 7:37













1












1








1








I want to show a map of the calculated route (truck). How can I do that?
Currently the map showed is based on the lat&long, so not on the calculated route.



image of C# code










share|improve this question
















I want to show a map of the calculated route (truck). How can I do that?
Currently the map showed is based on the lat&long, so not on the calculated route.



image of C# code







rest here-api






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 15 '18 at 7:36







Adriaan

















asked Nov 15 '18 at 7:22









AdriaanAdriaan

62




62












  • Please provide us some code on what your inputs are etc.. for us to help you better.

    – HERE Developer Support
    Nov 15 '18 at 7:28











  • I've added an image with the C# code I have at the moment

    – Adriaan
    Nov 15 '18 at 7:37

















  • Please provide us some code on what your inputs are etc.. for us to help you better.

    – HERE Developer Support
    Nov 15 '18 at 7:28











  • I've added an image with the C# code I have at the moment

    – Adriaan
    Nov 15 '18 at 7:37
















Please provide us some code on what your inputs are etc.. for us to help you better.

– HERE Developer Support
Nov 15 '18 at 7:28





Please provide us some code on what your inputs are etc.. for us to help you better.

– HERE Developer Support
Nov 15 '18 at 7:28













I've added an image with the C# code I have at the moment

– Adriaan
Nov 15 '18 at 7:37





I've added an image with the C# code I have at the moment

– Adriaan
Nov 15 '18 at 7:37












1 Answer
1






active

oldest

votes


















0














If you are trying to display a map with a polyline(route) on it you can use one of the below two solutions:




  1. Maps API for Javascript: A polyline is created using the H.map.Polyline class, passing in an H.geo.LineString holding the points of the line. The look-and-feel of the polyline can be altered by adding the style parameter. Read more at developer.here.com/api-explorer/maps-js/v3.0/geoshapes/polyline-on-the-map

`



function addPolylineToMap(map) 
var lineString = new H.geo.LineString();
lineString.pushPoint(lat:53.3477, lng:-6.2597);
lineString.pushPoint(lat:51.5008, lng:-0.1224);
lineString.pushPoint(lat:48.8567, lng:2.3508);
lineString.pushPoint(lat:52.5166, lng:13.3833);
map.addObject(new H.map.Polyline(
lineString, style: lineWidth: 4
));



`

2. Map Image API: Replace app id and app code values with actuals. Read more at developer.here.com/api-explorer/rest/map-image/map-image-with-routes



GET https://image.maps.api.here.com/mia/1.6/route?r0=52.5338%2C13.2966%2C52.538361%2C13.325329&r1=52.540867%2C13.262444%2C52.536691%2C13.264561%2C52.529172%2C13.268337%2C52.528337%2C13.273144%2C52.52583%2C13.27898%2C52.518728%2C13.279667&m0=52.5338%2C13.2966%2C52.538361%2C13.325329&m1=52.540867%2C13.262444%2C52.518728%2C13.279667&lc0=00ff00&sc0=000000&lw0=6&lc1=ff0000&sc1=0000ff&lw1=3&w=500&app_id=xxxx&app_code=xxxxx






share|improve this answer






















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53314270%2fhere-api-show-map-based-on-the-calculated-route%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    If you are trying to display a map with a polyline(route) on it you can use one of the below two solutions:




    1. Maps API for Javascript: A polyline is created using the H.map.Polyline class, passing in an H.geo.LineString holding the points of the line. The look-and-feel of the polyline can be altered by adding the style parameter. Read more at developer.here.com/api-explorer/maps-js/v3.0/geoshapes/polyline-on-the-map

    `



    function addPolylineToMap(map) 
    var lineString = new H.geo.LineString();
    lineString.pushPoint(lat:53.3477, lng:-6.2597);
    lineString.pushPoint(lat:51.5008, lng:-0.1224);
    lineString.pushPoint(lat:48.8567, lng:2.3508);
    lineString.pushPoint(lat:52.5166, lng:13.3833);
    map.addObject(new H.map.Polyline(
    lineString, style: lineWidth: 4
    ));



    `

    2. Map Image API: Replace app id and app code values with actuals. Read more at developer.here.com/api-explorer/rest/map-image/map-image-with-routes



    GET https://image.maps.api.here.com/mia/1.6/route?r0=52.5338%2C13.2966%2C52.538361%2C13.325329&r1=52.540867%2C13.262444%2C52.536691%2C13.264561%2C52.529172%2C13.268337%2C52.528337%2C13.273144%2C52.52583%2C13.27898%2C52.518728%2C13.279667&m0=52.5338%2C13.2966%2C52.538361%2C13.325329&m1=52.540867%2C13.262444%2C52.518728%2C13.279667&lc0=00ff00&sc0=000000&lw0=6&lc1=ff0000&sc1=0000ff&lw1=3&w=500&app_id=xxxx&app_code=xxxxx






    share|improve this answer



























      0














      If you are trying to display a map with a polyline(route) on it you can use one of the below two solutions:




      1. Maps API for Javascript: A polyline is created using the H.map.Polyline class, passing in an H.geo.LineString holding the points of the line. The look-and-feel of the polyline can be altered by adding the style parameter. Read more at developer.here.com/api-explorer/maps-js/v3.0/geoshapes/polyline-on-the-map

      `



      function addPolylineToMap(map) 
      var lineString = new H.geo.LineString();
      lineString.pushPoint(lat:53.3477, lng:-6.2597);
      lineString.pushPoint(lat:51.5008, lng:-0.1224);
      lineString.pushPoint(lat:48.8567, lng:2.3508);
      lineString.pushPoint(lat:52.5166, lng:13.3833);
      map.addObject(new H.map.Polyline(
      lineString, style: lineWidth: 4
      ));



      `

      2. Map Image API: Replace app id and app code values with actuals. Read more at developer.here.com/api-explorer/rest/map-image/map-image-with-routes



      GET https://image.maps.api.here.com/mia/1.6/route?r0=52.5338%2C13.2966%2C52.538361%2C13.325329&r1=52.540867%2C13.262444%2C52.536691%2C13.264561%2C52.529172%2C13.268337%2C52.528337%2C13.273144%2C52.52583%2C13.27898%2C52.518728%2C13.279667&m0=52.5338%2C13.2966%2C52.538361%2C13.325329&m1=52.540867%2C13.262444%2C52.518728%2C13.279667&lc0=00ff00&sc0=000000&lw0=6&lc1=ff0000&sc1=0000ff&lw1=3&w=500&app_id=xxxx&app_code=xxxxx






      share|improve this answer

























        0












        0








        0







        If you are trying to display a map with a polyline(route) on it you can use one of the below two solutions:




        1. Maps API for Javascript: A polyline is created using the H.map.Polyline class, passing in an H.geo.LineString holding the points of the line. The look-and-feel of the polyline can be altered by adding the style parameter. Read more at developer.here.com/api-explorer/maps-js/v3.0/geoshapes/polyline-on-the-map

        `



        function addPolylineToMap(map) 
        var lineString = new H.geo.LineString();
        lineString.pushPoint(lat:53.3477, lng:-6.2597);
        lineString.pushPoint(lat:51.5008, lng:-0.1224);
        lineString.pushPoint(lat:48.8567, lng:2.3508);
        lineString.pushPoint(lat:52.5166, lng:13.3833);
        map.addObject(new H.map.Polyline(
        lineString, style: lineWidth: 4
        ));



        `

        2. Map Image API: Replace app id and app code values with actuals. Read more at developer.here.com/api-explorer/rest/map-image/map-image-with-routes



        GET https://image.maps.api.here.com/mia/1.6/route?r0=52.5338%2C13.2966%2C52.538361%2C13.325329&r1=52.540867%2C13.262444%2C52.536691%2C13.264561%2C52.529172%2C13.268337%2C52.528337%2C13.273144%2C52.52583%2C13.27898%2C52.518728%2C13.279667&m0=52.5338%2C13.2966%2C52.538361%2C13.325329&m1=52.540867%2C13.262444%2C52.518728%2C13.279667&lc0=00ff00&sc0=000000&lw0=6&lc1=ff0000&sc1=0000ff&lw1=3&w=500&app_id=xxxx&app_code=xxxxx






        share|improve this answer













        If you are trying to display a map with a polyline(route) on it you can use one of the below two solutions:




        1. Maps API for Javascript: A polyline is created using the H.map.Polyline class, passing in an H.geo.LineString holding the points of the line. The look-and-feel of the polyline can be altered by adding the style parameter. Read more at developer.here.com/api-explorer/maps-js/v3.0/geoshapes/polyline-on-the-map

        `



        function addPolylineToMap(map) 
        var lineString = new H.geo.LineString();
        lineString.pushPoint(lat:53.3477, lng:-6.2597);
        lineString.pushPoint(lat:51.5008, lng:-0.1224);
        lineString.pushPoint(lat:48.8567, lng:2.3508);
        lineString.pushPoint(lat:52.5166, lng:13.3833);
        map.addObject(new H.map.Polyline(
        lineString, style: lineWidth: 4
        ));



        `

        2. Map Image API: Replace app id and app code values with actuals. Read more at developer.here.com/api-explorer/rest/map-image/map-image-with-routes



        GET https://image.maps.api.here.com/mia/1.6/route?r0=52.5338%2C13.2966%2C52.538361%2C13.325329&r1=52.540867%2C13.262444%2C52.536691%2C13.264561%2C52.529172%2C13.268337%2C52.528337%2C13.273144%2C52.52583%2C13.27898%2C52.518728%2C13.279667&m0=52.5338%2C13.2966%2C52.538361%2C13.325329&m1=52.540867%2C13.262444%2C52.518728%2C13.279667&lc0=00ff00&sc0=000000&lw0=6&lc1=ff0000&sc1=0000ff&lw1=3&w=500&app_id=xxxx&app_code=xxxxx







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 15 '18 at 10:34









        HERE Developer SupportHERE Developer Support

        1,7801611




        1,7801611





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53314270%2fhere-api-show-map-based-on-the-calculated-route%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Top Tejano songwriter Luis Silva dead of heart attack at 64

            ReactJS Fetched API data displays live - need Data displayed static

            政党