Select to view content in your preferred language

MyLocation

3474
5
Jump to solution
08-19-2014 12:35 PM
KeisukeNozaki
Occasional Contributor II

I want to set a scale for MyLocation widget, so it would not zoom too much.

For JavaScript API, all I need to do was inserting scale:2400.

Syntax in the widget looks a little different from API Reference.

Please let me know which part is missing.

Thank you.

{

  "locateButton": {

    "geolocationOptions": {

      "timeout": 15000

    },

    "highlightLocation": true,

        "scale": 2400

  }

}

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Keisuke,

   If this question is answered and no longer a question than please mark it as answered. You can do this by clicking the "Correct Answer" link with the little green star.

View solution in original post

5 Replies
RobertScheitlin__GISP
MVP Emeritus

Keisuke,

  This seems to be working perfectly for me:

{

  "locateButton": {

    "geolocationOptions": {

      "timeout": 15000

    },

    "highlightLocation": true,

    "scale": 48000

  }

}

KeisukeNozaki
Occasional Contributor II

Yes, it works now.

I had to reboot my tablet once.

Thank you very much for checking.

Do you know why syntax is slightly different?

In API, there is no " " required.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Keisuke,

  It is just a difference in how the API handles the json (directly in JavaScript code) and how the WAB has to handle it when processing the json file (basically text).

RobertScheitlin__GISP
MVP Emeritus

Keisuke,

   If this question is answered and no longer a question than please mark it as answered. You can do this by clicking the "Correct Answer" link with the little green star.

MattDeFoor
New Contributor II

Hey Robert, will you follow me so I can send you a PM on here? I had your email back in the Flex heyday, but it's no longer in my contacts. It's a WAB question, but I ran out of characters while trying to post it on here. Thanks

0 Kudos