on 03-02-2017 2:42 PM
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,
Johannes
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.
Problematics:
Kind Regards,
Johannes Schneider
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Johannes,
Is the Javscript function addMarkersAndSetViewBounds executing when you fire the outport?
Thanks,
Will
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Will,
i dont know if any of the javascript functions are runnung when i fire the outport.
I'm currently not able to debug the js in the broswer so i'll never know.
The only thing i know is that if i feed the informations before the mashup is loaded it works and changing the parameters doesnt change anything.
Kind Regards,
Johannes
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.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Diego,
i tried to implement the eventhandler as you mentioned but it does not seem to change anything.
For debug reasons i added a different eventhandler to see if the eventhandler is triggered by selecting a row and it works perfectly fine. Im pretty sure it has nothing to do with the standard sdk stuff but with the html mashup. The js functions somehow need to be retriggered but i have no clue how to manage that.
Kind Regards,
Johannes
Hi Johannes.
Can you explain how you achieved this requirement ? I'm stuck with a similar problem.
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.