cancel
Showing results for 
Search instead for 
Did you mean: 

Use Images for GeoMap/Analytic Map

Former Member
0 Kudos

I have a requirement to place pins on a specific floor map of a building. I found out that SAPUI5 has GeoMap or Analytic Map which can help set pins on the map. However, the map these use are world maps. Can I set it to an image rather than a map? If not, what can I do to achieve requirement?

Accepted Solutions (0)

Answers (1)

Answers (1)

iftah_peretz
Active Contributor
0 Kudos

Hey,

Does the image need to have the user put on the pins? If not you can preload the image with the pins.

If he does, then I would use AnalyticMap because you can use the <vbm:Spots> and <vbm:Spot> to place pins as you wish. Just make sure that the attribute type of <vbm:Spot> is not set to "Hidden" so you can see the pins and to specify your bulding map in a GeoJSON source as stated in the API:

"The AnalyticMap control. This control renders a Map based on a GeoJSON source. The GeoJSON file is searched in the following places in the given sequence:

  • <server>:<port>/sap/bc/vbi/geojson/L0.json
  • ./media/analyticmap/L0.json

Further it is possible to specify a different URL by setting static attribute sap.ui.vbm.AnalyticMap.GeoJSONURL.
The Features from the GeoJSON get rendered as neutral background in gray. They are not active, but may report a name via tooltip. Each feature is expected to have a property id or id2, where as id2 should be an ISO country according to ISO 3166-2.
By adding Region elements to the regions aggregation it is possible to make feature from the GeoJSON interactive. Region elements need to match by ISO code."

You can always put it in a simple HTML container and use CSS to mark the places - you'd need a call back for where the user clicked - I would google it.

Jayakrishnan
Active Participant
0 Kudos

Hi Iftah,

can i use the geojson layer for geomap(sap.ui.vbm.GeoMap)?. If yes could you please help me on this i will share the code.

Thank you,

Regards,

JK.