Skip to Content
avatar image
Former Member

Use Images for GeoMap/Analytic Map

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • 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.

    Add comment
    10|10000 characters needed characters exceeded