Skip to Content

Use Images for GeoMap/Analytic Map

Oct 11, 2017 at 07:50 AM


avatar image
Former Member

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?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Iftah Peretz
Dec 15, 2017 at 06:28 PM


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.

10 |10000 characters needed characters left characters exceeded