Reimers.dk

.NET, AJAX and Google APIs brought together
Welcome to Reimers.dk Sign in | Join | Help
in Search

Display value and selected value

Last post 01-24-2007, 11:40 by jjrdk. 1 replies.
Sort Posts: Previous Next
  •  01-24-2007, 8:39 311

    Display value and selected value

    I'm using the sidebar control in conjunction with your map. I'm also using the sidbar to get the unique ID of the selected location so I can query an SQL database for additional information on that point.

    Currently, I have the unique ID visible in the sidebar. Is there a way to display something other than the ID?  Similar to the ASP dropdown and listbox control?  Display value and selected value.

    I need to use the unique ID that I generate when a point is saved because useres may have the same location name.

  •  01-24-2007, 11:40 312 in reply to 311

    Re: Display value and selected value

    I'm not quite sure I understand the question. I'm guessing that what is displayed in the sidebar is a list of GoogleMarkers, each located at some specific (unique) location. Instead of displaying the ID for the marker in the sidebar you want some other value displayed? You are not using the location name to identify the marker as it is not unique.

    The problem is that the sidebar is in fact an HTML table. Unlike select tags in HTML tables don't have visible and hidden values, so it is not directly possible to set some hidden value that works as a unique identifier. In the next version of the sidebar the default display text for overlays in the sidebar will be the name property of the respective overlay options. This should give some more flexibility to display overlays with non-unique names.

    This of course does not solve your problem now, but what you can do is to write your own postback command and set the unique id as the argument. To make your markers' names unique you can add a counter after the name when you add them to the overlay collection (ex. "Drug store 1", "Drug store 2" etc).
     

View as RSS news feed in XML