2 Google Streetviews in ThirdPartyMaps, how?
HI All,
In my current HTML 5 viewer I have 2 external viewers: bing and google. One can choose between them or can turn both on, giving two differently location perspectives of the same street object - very useful to simultaneously view, great for locating features.
However, Bing Streetside is not quite as current as Streetview in my area.
So, what I would like to do is to add a 2nd map of Streetview.
I tried various things in GoogleMaps.html, ThirdPartyMap.js, and Desktop.json.js - but no luck so far - the second Streetview comes up blank. So here's what I have done so far.
I created another copy of GoogleMaps.html in .\Resources\3rdPartyMapsdirectory viewer directory named GoogleMaps2.html. I changed this line; id was googleMaps, now googleMaps2:
var thirdPartyMap = new geocortex.essentialsHtmlViewer.integration.ThirdPartyMap("googleMaps2",
initializePanorama,
getMapViewpointParams,
handleViewerPositionUpdatedEvent,
handleViewpointIndicatorUpdatedEvent);
In Desktop.jxson.js I added the googleMaps2 to the viewModels ExternalComponentViewModel externalComponents.
"externalComponents": [
{
"id": "googleMaps",
"displayName": "Google Street View 1",
"uri": "Resources/3rdPartyMaps/GoogleMaps.html",
"viewpointIndicatorUri": "Resources/Images/Icons/location-direction-blue-32.png"
},
{
"id": "googleMaps2",
"displayName": "Google Street View 2",
"uri": "Resources/3rdPartyMaps/GoogleMaps2.html",
"viewpointIndicatorUri": "Resources/Images/Icons/location-direction-green-32.png"
},
{
"id": "bingMaps",
"displayName": "Bing Maps",
"uri": "Resources/3rdPartyMaps/BingMaps.html",
"viewpointIndicatorUri": "Resources/Images/Icons/location-direction-red-32.png"
}
]
After a viewer reload all 3 external maps show in the map picker. "Google Street View1" & "Bing Maps" work fine. The new one "Google Street View2" not so much, shows as blank and the directional location marker is not visible. Also, the directional location marker (in the external map window) should be green, it is blue.
What else should I be configuring?
Before I go too deep in experimenting, does anybody have any recommendations here? I know I can, with time, figure this out but if anyone has any help...
Thanks,
Wiley
Wiley Osborn
Contra Costa County, CA
Public Work Dept, IT Div
0
-
Is there anything in the browser's console window (F12)? 0 -
Hi Benerd,
Actually there is a lack of activity when the non functional 2'nd streetview window opens. It shows all the same items as the functional window. Nothing very outstanding.
I did notice though that the non function windows controls do not work, they don't fire off JS events when clicked. Clearly something is wrong with registration.
So two things:- JS is not registering the controls to the events.
- the load event is not triggering the js to show streetview content.
Thanks,
Wiley0 -
This is a (very) wild guess, but I seem to remember there was a problem when two external components had similar names (i.e. googleMaps and googleMaps2). Could you try to rename one of them? But that was a few versions ago. No idea if it was ever fixed though. 0 -
Wow, totally worked. Used 'gMaps2' instead of 'googleMaps2' for the ID and the html file name.
Definitely not fixed, but easy enough to go round.
Thank you very much Berend, Consider this question well answered!
Wiley0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
4 kommentarer