Reputation: 11
I could successfully load location data (lat,lon) at my Dashboard UI in tabular form using Odata API. Now I need to display them in a Map. I'm referring this as sample. Here is images of my dashboard table . Now from my table, I only need to display the location of the first row data in my map. please help on how do i do that?
Upvotes: 0
Views: 794
Reputation:
According to One-Step GeoMap Example it should be possible, to use any image for a spot. In section “Resource Handling for Visual Objects” it says: In addition to the semantically-typed Spot with a built-in visualization, you can use any image for a Spot. The image needs to be loaded as a resource and can be referenced by Spots. Since the Spot was built for images like pins, the image is, by default, aligned in a way that the bottom center of the image is at the given geo position. For other images, a center alignment might be more appropriate.
Here is the code for JavaScript Views in UI5:
var oVBI = new sap.ui.vbm.GeoMap({
resources : [
new sap.ui.vbm.Resource({ "name" : "SAP_logo",
"src" : "images/SAP_logo.png"})
],
vos : [ new sap.ui.vbm.Spots({
items : [ new sap.ui.vbm.Spot({ position : "20;0;0",
tooltip : 'SAP',
image : "SAP_logo",
scale : "0.2;0.2;0.2",
alignment: "0"})
]
})]
});
Upvotes: 0