The Current InfoWindow, wish to put the Rating Control somewhere
there.
http://img121.imageshack .us/i/infowindow.png/
The Rating control i wish to add
http://img180.imageshack .us/i/averagerating.png/

thank you very much.


On Jun 21, 6:01 pm, AngelicCore <[email protected]> wrote:
> thanks for your reply.
> I'll try to explain it in detail,
> I have an xml file with the Ratings in it. Something like :
> <?xml version="1.0" encoding="utf-8"?>
> <Ratings>
> <AngelicCore>
> <Entity Name="Hilton Pyramids Golf Resort" Rating="5" />
> </AngelicCore>
> </Ratings>
> I read the ratings of each user, get the Average Rating. Lets say it's
> 5.
> Now using an ordinary page.aspx i just add Rating Control from the
> ajax control toolbox, similar to this:
> <asp:Rating ID="AverageRating" runat="server" CurrentRating="0"
> MaxRating="10" StarCssClass="ratingStar"
> WaitingStarCssClass="savedRatingStar"
> FilledStarCssClass="filledRatingStar"
> EmptyStarCssClass="emptyRatingStar" ReadOnly="true" />
> using c# code behind file i just change the CurrentRating attribute to
> 5 and it's all good and done.
>
> Now my problem is that i wish to add the same Rating Control to the
> infowindow, i don't even need the user to be able to vote, just view
> the average rating as a star system.
> So the Infowindow will look like this:
> Name: Hilton Pyramids Golf Resort
> Address: blablabla i don't know
> Type: Hotel
> Average Rating: (*******)                <- where i wish to put the
> Rating Control.
>
> If i can upload screen shots I'll do that to make it easier to
> understand my question. :)
>
> On Jun 21, 5:36 pm, Davide Cremonesi <[email protected]> wrote:
>
> > Hi there,
> > is difficoult to understand without a working example online, I will try to
> > make a guess.
> > I would say that your html variable is defined with an insufficient scope in
> > respect to the click listener.
> > When the event is fired and the callback function is called html is not
> > defined anymore.
> > Try to attach the html object is to the Marker object as an attribute and
> > inside the callback function access it as Marker.html
> >  Hope it works,
> > Davide
>
> > 2010/6/21 AngelicCore <[email protected]>
>
> > > Hi, i've had some trouble adding an Ajax rating control to Infowindow.
> > > Does anyone know how to do it?
>
> > > My site is still under development on my File System so i can't post a
> > > link but all i need is to know how to add the rating control to the
> > > infowindow html section.
>
> > > that's the code so far in that section:
>
> > >  Photo = Markers[j].getAttribute("Photo");
> > >  Point = new
> > > google.maps.LatLng(parseFloat(Markers[j].getAttribute("Lat")),
> > > parseFloat(Markers[j].getAttribute("Lng")));
> > >  URL = "ViewEntity.aspx?EntityName=" + Name;
> > > html = "<div style='min-width:220; min-height:100;'>" + "<img
> > > src='Thumbnail.ashx?Size=100" + "&PhotoPath=" + Photo + "'>" + "</
> > > div>" + "<div style='min-height:100;'>" + "<b>" + Name + "</b> <br/>"
> > > + Address + "<br />" + "<a href='" + URL + "'>Show Entity</a>" + "</
> > > div>";
> > > Icon = CustomIcons[Type];
> > > Marker = new google.maps.Marker({ map: Map, position: Point, icon:
> > > Icon.Icon });
> > > Marker.setZIndex(undefined);
> > > BindInfoWindow(Marker, Map, InfoWindow, html);
>
> > > function BindInfoWindow(Marker, Map, InfoWindow, html) {
> > >    google.maps.event.addListener(Marker, 'click', function () {
> > >        InfoWindow.setContent(html);
> > >        //InfoWindow.disableAutoPan = true;
> > >        InfoWindow.open(Map, Marker);
> > >    });
> > > }
>
> > > another question, although this is far less crucial for me. I am using
> > > master pages, so i have the <script> tags in the master page. Problem
> > > is, when i need to access that JS file which is in ./Scripts/GMaps.js
> > > in a page within a folder like ./Categories i am unable to do that
> > > because it looks for in ./Categories/Scripts/.js not in ./Scripts
> > > The way I've solved it this far is by making a copy of the file and
> > > putting it in the Categories/Scripts/.
> > > Is there a better way to do that?
> > > code in master page in the head section:
>
> > >    <script src="http://maps.google.com/maps/api/js?sensor=false";
> > > type="text/javascript"></script>
> > >    <script src="http://www.google.com/jsapi"; type="text/javascript"
> > > ></script>
> > >    <script src="Scripts/GMaps.js" type="text/javascript"></script>
>
> > > if there is anything i can add to help you answer my question please
> > > say so.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "Google Maps JavaScript API v3" group.
> > > To post to this group, send email to
> > > [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<google-maps-js-api-v3%[email protected]>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-maps-js-api-v3?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to