locked
Visual Studio 2012 - Lightswitch Silverlight - How to place multiple Push pins on Bing Map? (Non-HTML Version) RRS feed

  • Question

  • * Have an application that will do this in a HTML Client Version for something else... but that code does not translate into the Silverlight methodology.

    ---

    So we created and populated a Customer Database in Microsoft LightSwitch using Visual Studio 2012.

    Later: 

    1. Created a Query that allows us to get the appropriate records.

    2. Created a Calculated Field which we will call "FullAddress" for use below.

    3. Created a screen that needs to be able to place multiple Push Pins on a Bing Map.
    * Not working yet on the Multiple Push Pins *

    If we use the code as is and use the "FullAddress" (Address, City, State, and Zip Code) then each record will create a Bing Map with a push pin to its' Geolocation using the Bing Map Control by simply changing "FullAddress" to a BingMapControl.

    So if there are 12 Customer Records, then there are 12 lines of customer details each with its' own Bing Map.

    * Our goal is to put push pins on ONE common Map using the BingMapControl without showing any record details.

    This routine shows us that we can handle each Customer Record from the Database:

    ---

        Private Sub MapAllBusinessesDetail_InitializeDataWorkspace(saveChangesTo As List(Of Microsoft.LightSwitch.IDataService))

             Dim TotalItems = Me.AllBusinessDetails.Count ' Returns 12 items found

             ' Process all of our records...
             For Each businessData In AllBusinessDetails

                ' We can see each record that we want line by line from the LightSwitch Database
                 '... businessData.AddressLine1
                 '... businessData.City
                 '... businessData.ZipCode
                 '... businessData.Country

                ' *** Not sure what to add here to place the 12 Push Pin items on a common Bing Map... ***

             Next

          End Sub

    ---

    So any ideas on how to have ONLY 1 Bing Map with the desired Push Pins?

    Thank you in advance for any helpful ideas to quickly get this accomplished,
    BillNew


    DirectShow Filter Graph Spy: http://alax.info/blog/777 Extremely helpful for finding deep details for DirectShow Graphs.



    • Edited by BillNew Tuesday, May 20, 2014 8:46 PM Corrected Title of this thread
    Tuesday, May 20, 2014 2:43 AM

Answers

  • Nevermind... We will work on an HTML Client version to point to the OData via the .SVC file on the main site to accomplish what we are working on.

    We already have the ability to show multiple pins on the same map now in that version.


    So please consider this thread as closed.

    Thanks anyway.

    BillNew

    DirectShow Filter Graph Spy: http://alax.info/blog/777 Extremely helpful for finding deep details for DirectShow Graphs.

    • Marked as answer by BillNew Thursday, May 22, 2014 7:29 PM
    Thursday, May 22, 2014 7:29 PM