6 Replies Latest reply on Oct 31, 2016 7:51 AM by pchung RSS
    sreddy-2 Newbie

    Displaying the country names on google map

    Dears ,

     

    I wanted to point out the different places on google map.

     

    am a newbie,

     

    Please and kindly help  me how can i do it with an example

      • Re: Displaying the country names on google map
        Mayank Patel Apprentice

        Hi Sruchan,

         

        Please follow this to get your ans : How to set multiple marker in google Map in Mashup ?

        For that you need to create a service and return parameter as a Info Table , In mashup add this service and bind it's result in to map.

         

        Thanks,

        Mayank

        • Re: Displaying the country names on google map
          sreddy-2 Newbie

          Hello Mayank

           

          I have tried this

           

          1. i created a thing , declared a property called loc with location property

           

          2. i created service

          and created a infotable with the help of ur scource code as shown below

           

          var params = {

            infoTableName : "InfoTable",

            dataShapeName : "DataShape"

          };

           

           

          // CreateInfoTableFromDataShape(infoTableName:STRING("InfoTable"), dataShapeName:STRING):INFOTABLE(DataShape)

          var result = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params);

           

           

          // location:LOCATION

          var location = new Object();

          location.latitude = 23.452;

          location.longitude = 72.124;

          location.elevation = 0;

          location.units = "WGS84";

           

          result.AddRow({location:location});

           

           

          //location:LOCATION2

          var location2 = new Object();

          location2.latitude = 23.123;

          location2.longitude = 72.456

          location2.elevation = 0;

          location2.units = "WGS84";

          result.AddRow({location:location2});  // You can Add multiple marker using Add row.

           

          But when i tried to test the service the output is empty

           

            • Re: Displaying the country names on google map
              pchung Collaborator

              Did you set your Service Output to InfoTable and then I also advice you assign the Proper DataShape to it as well.

              btw since this is a platform there are quite a few ways to accomplish this.

              One thought is to have a Thing per country all based on the same ThingTemplate and then you can add other properties/meta data including the location

              then you can use GetImplementingThingsWithData to get the Countries, their locations and other information to use all at once.