Skip to Content

Retrigger values in a html mashup

Hello experts,

I am currently playing with the nokia here html + js mashup. There I have to fill the longitude and latitude to set markers on the map. There i managed to set my own values via some outports + scripts !before the mashup is loaded!. This works perfectly fine.

Please ignore where the upper marker is positioned, its just some testing.

For my issue:
Now I want to select the second row of my addresses and let the marker jump to the new position. Therefore I implemented the button show location. For testing purposes I only created a script in the eventhandler which changes the lat of the marker in the bo. After that I trigger the outport which is bound to the mashup. but nothing is happening after that.

Could someone please provide me with informations?

Here the script + the outport + the html code

Kind Regards,


Add comment
10|10000 characters needed characters exceeded

4 Answers

  • Best Answer
    Posted on Mar 09, 2017 at 09:42 AM

    Hello Diego,

    with the javascript function "eval(String)" you can execute everything what is saved within a string.

    In my HTML code in the function where i set individual amount of markers and add them to a group, i added 2 eval functions. Before the html mashup code is read, i set the values i need for the 2 parameters which then gets executed.

    So what is with the zoom now?

    Here i added a third eval function at the bottom of my html which is empty at the initial laod of the html mashup.

    So after selecting the row where the map should zoom to, I add a script which fills the parameter ZoomLine1 with the needed code. The next problem is, that when once loaded the HTML Mashup offers no opportunity the be re-read or recognize changed values and executes them or sth. So I implemented in the eventhandler, which sets the data I need in parameter ZoomLine1, a script that simply changes an indicator from ture to false bevore the parameter is set. After the parameters is set and the map is ready to zoom (at the very end of the eventhandler) the indicator is set from false to true again. Now you simply have to bind the visibillity of the Mashup against the used indicator and et voilà, the map is zoomed to the selected entry.


    1. eval is a very dangerous function: If there is any way to replace the parameter entry besides the outports by the system like another js or something, things can get real dangerous because you can exectue excatly anything throughout this function.
    2. It does not look good: Because I had to make reload the whole HTML-mashup after selecting the row, you shortly get a white-screen which tells you that the map is loading. This is not very good looking but necessary because otherwise one is not able to see which point belongs to which entry in the DataList. If you have any other solutions to solve this problem kindly forward the to me.

    Kind Regards,

    Johannes Schneider

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 03, 2017 at 12:32 PM

    Hi Johannes,

    Is the Javscript function addMarkersAndSetViewBounds executing when you fire the outport?



    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 03, 2017 at 10:41 AM

    Hello Joahnnes,

    Did you tried to add your Event Handler to the Lead Selection Change Event ?

    Data Model - Data List - Properties - OnLeadSelectionChange

    Let me know if it works.


    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 07, 2017 at 05:23 PM

    Hi Johannes.

    Can you explain how you achieved this requirement ? I'm stuck with a similar problem.

    Thank you.

    Add comment
    10|10000 characters needed characters exceeded