cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

making the google maps widget visible/invisible dynamically

tlichtenberger-
1-Newbie

making the google maps widget visible/invisible dynamically

Hello everyone!

Currently I am working on two google maps widgets which are superimposed. The two google maps widgets are showing exactly the same locations, but

with different marker icons. What I want to do is to make the overlying google map visible/invisible based on the value of a boolean property which is defined in my helper thing.

In the following, I show you how I tried to realize that:

1) I have declared a boolean value named "IsVisible" that emits an event every time the value changes:

2) I have implemented a custom service which gets executed everytime a specific value has changed and sets the "IsVisible"-property to the correct value.

3) Then I have binded the event "ServiceInvokeCompleted" of my custom service with the imported service "GetBooleanPropertyValue" and have defined the

     needed PropertyName parameter as "IsVisible".

4) then I have binded the boolean Output of the function "GetBooleanPropertyValue" with the visible-property of the overlaying google maps widget.

Any suggestions on how to solve this problem?

Thank you so much in advance.

Best regards,

Theresa

1 ACCEPTED SOLUTION

Accepted Solutions
ankigupta
5-Regular Member
(To:tlichtenberger-)

Hi Theresa Lichtenberger​,

Here is workaround I thought for this issue:

Create two Duplicate Mashup but with different icons. Now when you want to change the icon navigate to other mashup i.e. bind navigate event of Navigate widget with the required event.

I hope it helps.

View solution in original post

4 REPLIES 4
ankigupta
5-Regular Member
(To:tlichtenberger-)

Hi Theresa Lichtenberger​,

On what step are you facing issue?

hey @Ankit Gupta!

it seems that the map is just going gray instead of invisible.

upload.png

Unfortunately, I do not exactly where the mistake could be. Maybe you have an other approach to solve this?

Thank you btw for your superfast answer. This is very much appreciated .

best wishes,

theresa

ankigupta
5-Regular Member
(To:tlichtenberger-)

Hi Theresa Lichtenberger​,

I checked this scenario on my local instance and I was able to reproduce this issue. It seems that Google map rendering happens on Mashup load and the invisible Map remains un-rendered.

Is there any specific reason to use two different marker icons for the same location. Could you please share use case in more detail?

ankigupta
5-Regular Member
(To:tlichtenberger-)

Hi Theresa Lichtenberger​,

Here is workaround I thought for this issue:

Create two Duplicate Mashup but with different icons. Now when you want to change the icon navigate to other mashup i.e. bind navigate event of Navigate widget with the required event.

I hope it helps.

Top Tags