I am using two WebGMap components at the same time.
The first is on the user interface, the second one is larger and is used to make a bigger screenshot refelecting the situation on the first component.
How can I detect in code when a user switches to streetview or back to the map on the first component?
Unfortunately there is currently no event available that is triggered when the user toggles streetview on the map.
However this is a good suggestion and we'll investigate if this functionality can be added in a future version.
Bart Holvoet2015-07-07 11:16:46
Thnx for the quick response. Looking to the code I was already afraid that would be the answer.
I'm at the moment able to switch both components with the command:
I implemented for Maps1 the OnStreetviewChange event as below:
procedure TForm2.Maps1StreetViewChange(Sender: TObject; Heading, Pitch,
Maps2.StreetViewOptions.Heading := Heading;
Maps2.StreetViewOptions.Pitch := Pitch;
Maps2.StreetViewOptions.Zoom := Zoom;
The event is triggered but Maps2 does not change. What am I doing wrong?
Please note that StreetViewOptions Heading/Pitch/Zoom are only updated when the StreetView is initialized.
You can trigger the initialization after updating the Heading/Pitch/Zoom by hiding the StreetView and then making it visible again.
Maps2.StreetViewOptions.Visible := false;
Maps2.StreetViewOptions.Visible := true;
That's working indeed, thnx again....