I want to add GeoMap Spot and Legend in Googlemaps
My.view.xml:
<l:FixFlex>
<l:flexContent>
<vk:MapContainer autoAdjustHeight="true">
<vk:content>
<vk:ContainerContent titile="test">
<vk:content>
<vbm:AnalyticMap id="map"></vbm:AnalyticMap>
</vk:content>
</vk:ContainerContent>
</vk:content>
</vk:MapContainer>
</l:flexContent>
</l:FixFlex>
My.controller.js
var mapDom = this.getView().byId("map").getDomRef();
onAferRendering: function() {
jQuery.sap.includeScript(
"https://maps.googleapis.com/maps/api/js?key=XXX",
null,
function() {
...
mainmap =new google.maps.Map(mapDom, mapProp);
}
}
This is working, Googlemap is added successfully.
But When I add Spot in AnalyticMap, googlemaps disappeared. Only AnalyticMap and Spots shows.
<l:FixFlex>
<l:flexContent>
<vk:MapContainer autoAdjustHeight="true">
<vk:content>
<vk:ContainerContent titile="test">
<vk:content>
<vbm:AnalyticMap id="map">
<vbm:vos>
<vbm:Spots items="{/Spots}" click="onClickItem" contextMenu="onContextMenuItem">
<vbm:Spot position="{pos}" tooltip="{tooltip}" type="{type}" text="{text}" click="onClickSpot" contextMenu="onContextMenuSpot" />
</vbm:Spots>
</vbm:vos>
</vbm:AnalyticMap>
</vk:content>
</vk:ContainerContent>
</vk:content>
</vk:MapContainer>
</l:flexContent>
</l:FixFlex>
I use demo in Explored
How to combine these two? Can I use both markers in googlemaps and spots in GeoMap?
I was thinking use markers only , but I can't write data on markers(only way is write lable for markers), And I also need Legend in GeoMap.