locked
general questions about Lightswitch HTML client RRS feed

  • Question

  • Hi,

    I'm entirely new to lightswitch and trying to find my way through all the info online. However, on a few topics I still have open questions:

    > in a recent article (http://msdn.microsoft.com/en-us/magazine/dn296545.aspx) I read "...can help your business save time and money by allowing data not only to be consulted, but also modified and stored back (collecting a customer’s signature when a package is delivered, for example), and sometimes even making use of some device-specific capabilities such as geolocation (capturing the location where a soil sample is collected, for example)...." >> Are there any examples available of collecting a signature or capturing a location through device-specific capabilities? 

    > the easiest way to have a lightswitch html client up and running is to upload on Windows Azure. I know there is a 30-day free trial. But how can I calculate my monthly costs afterwards with Azure for hosting my lightswitch app and data (say 100Mb). I found the calculator (http://www.windowsazure.com/en-us/pricing/calculator/) but it's not clear to me which services I need (cloud services and/or data management and/ or...).

    > Is it possible to transfer a lightswitch app? Given the following scenario: as a freelance developer I create a lightswitch app for a customer. During development and testing the app is on my Azure account. One ready for release: Do I simply release the app to the account of the customer, or can I transfer the app and data (so that available data is not lost)?

    > this is not entirely Lightswitch but still: Once I have a lightswitch html app on Windows Azure: Can I access that database through tools (eg MSAccess)? the reason why I ask: Could it be possible to create desktop reporting using MS Access for a lightswitch db?

    Ben 

    Wednesday, August 28, 2013 1:17 PM

Answers

  • Hi Ben

    You can enable mapping and proximity-based scenarios by using the geolocation APIs to determine the current location of a particular device. The following example determines the coordinates for an entity that's named MyLocation with properties of type Double that are named Latitude and Longitude,

    To get the location

    1.In the Screen Designer, on the toolbar, choose the Write Code button.

    2.In the Code Editor, add the following method:

    myapp.AddEditMyLocation.GetGeolocation_execute = function (screen) { 
    
    if (navigator.geolocation) { 
    navigator.geolocation.getCurrentPosition(function (pos) { 
    screen.MyLocation.latitude = pos.coords.latitude.toString(); 
    screen.MyLocation.longitude = pos.coords.longitude.toString(); 
    }); 
    } 
    else { 
    alert("Geolocation not supported"); 
    } 
    }; 
    

    If you have any issues about Windows Azure, such as price, etc, you could also consult Windows Azure forum directly, we have specific professioanls to deal with WIndows Azure issues,

    Regards


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by Ben_999 Thursday, August 29, 2013 12:03 PM
    Thursday, August 29, 2013 9:42 AM

All replies

  • Hi Ben

    You can enable mapping and proximity-based scenarios by using the geolocation APIs to determine the current location of a particular device. The following example determines the coordinates for an entity that's named MyLocation with properties of type Double that are named Latitude and Longitude,

    To get the location

    1.In the Screen Designer, on the toolbar, choose the Write Code button.

    2.In the Code Editor, add the following method:

    myapp.AddEditMyLocation.GetGeolocation_execute = function (screen) { 
    
    if (navigator.geolocation) { 
    navigator.geolocation.getCurrentPosition(function (pos) { 
    screen.MyLocation.latitude = pos.coords.latitude.toString(); 
    screen.MyLocation.longitude = pos.coords.longitude.toString(); 
    }); 
    } 
    else { 
    alert("Geolocation not supported"); 
    } 
    }; 
    

    If you have any issues about Windows Azure, such as price, etc, you could also consult Windows Azure forum directly, we have specific professioanls to deal with WIndows Azure issues,

    Regards


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by Ben_999 Thursday, August 29, 2013 12:03 PM
    Thursday, August 29, 2013 9:42 AM
  • Thank You!
    Thursday, August 29, 2013 12:03 PM