cancel
Showing results for 
Search instead for 
Did you mean: 

sap.ui.vbm provider mapQuest error

0 Kudos

Hi all ;

    I use sap.ui.vbm library to show map and directions but it is not working now , I looked sapui5 vbm examples on web  but all of them have same error screen.  I think , it is common problem.

  You can see the geomap example screen of sapui5  with this link ;

    SAPUI5 Explored

  What can I  do to fix this error. If I buy an apikey from MapQuest , how can I use it in my code ?

  I create the map in my .xml file like this ;

<vbm:GeoMap  id="vbi" width="500px" xmlns:l="sap.ui.layout" initialPosition="{/bCoord}"

  height="500px" initialZoom="{/zoom}"  openWindow="onOpenDetail" closeWindow="onCloseDetail">

  <vbm:vos  >

  <vbm:Routes >

  <vbm:Route

            position="{/coord}" tooltip="Long Route" color="rgba(92,186,230,1.0)" colorBorder="rgb(255,255,255)"

                           hotDeltaColor="RHLSA(0,1,1,0.6)" />

  </vbm:Routes>

  </vbm:vos>

  </vbm:GeoMap>

Accepted Solutions (0)

Answers (1)

Answers (1)

rpanneel
Participant
0 Kudos

Hi,

You can pass in a MapProvider and use google maps/Bin maps in stead of MapQuest.

Change the MapProvider before the rendering of the GeoMap and you should be fine.

Regards,

Robin

0 Kudos

   Thank for your reply Robin.

   I tried but couldn't  achieve  

   I tried  write this code.  Can you fix this code ?

var mapConf = new sap.ui.model.json.JSONModel(

  {

      "MapProvider":

         [    

             {  "name": "GOOGLE",

                "type": "",

                "description": "",

                "tileX": "256",

                "tileY": "256",

               "maxLOD": "19",

                "copyright": "bla bla"

                      

             }

         ]          

  }

  );

     var map = this.getView().byId("vbi");

     map.setMapConfiguration(mapConf);   

former_member185414
Active Contributor
0 Kudos

Hello,

MapQuest error is coming because from sometime in July 2016(date don't remember) they have stopped direct access to their tiles which was used to construct the map.

Instead as suggested use the Google maps api or create a free account to mapquest and use the same.

Sample working code for google maps is attached.

BR.

0 Kudos

Hi Ankit ,

   I have mapquest key but I dont know , how I use it.

   I import the library like this --> xmlns:vbm="sap.ui.vbm"

   So I dont have any url to attach this key as a parameter.

former_member185414
Active Contributor
0 Kudos

When i encountered this scenario i moved to google maps due to time constraint.

In case you want to use mapquest only you can check the developer community

BR.