On Sep 16, 2:12 pm, cubangt <[email protected]> wrote:
> Thanks, ill search around some.. but i did change the code to the
> following and gets me closer to what i need, but not sure how to setup
> so i can loop thru the 3 columns in my code and populate each marker
> with the data needed.
That doesn't really seem to be a maps question but a database access
question from your serverside language of choice. Have you tried
searching the web or asking in an SQL/C# forum?
-- Larry
>
> DataSet ds = (DataSet)Session["MapData"];
>
> if (ds != null)
> {
> GoogleMap1.Latitude = 32.8030;
> GoogleMap1.Longitude = -96.7699;
> GoogleMap1.Zoom = 6;
>
> GoogleMarker bm = new GoogleMarker();
> bm.Latitude = Convert.ToInt32(ds.Tables[0].Rows[0]
> [4]);
> bm.Longitude = Convert.ToInt32(ds.Tables[0].Rows[0]
> [5]);
> bm.Text = ds.Tables[0].Rows[0][7].ToString();
>
> GoogleMarker bm1 = new GoogleMarker();
> bm1.Latitude = Convert.ToInt32(ds.Tables[0].Rows[1]
> [4]);
> bm1.Longitude = Convert.ToInt32(ds.Tables[0].Rows[1]
> [5]);
> bm1.Text = ds.Tables[0].Rows[1][7].ToString();
>
> GoogleMap1.Markers.Add(bm);
> GoogleMap1.Markers.Add(bm1);
>
> Label1.Text = "Not Empty";
> }
> else
> {
> Label1.Text = "Is Empty";
> }
>
> On Sep 16, 3:14 pm, "[email protected]" <[email protected]>
> wrote:
>
>
>
> > On Sep 16, 12:35 pm, cubangt <[email protected]> wrote:
>
> > > Thanks, but i was hoping to find somethign that had examples of using
> > > with .NET and C#. We have SQLExpress storing the information and
> > > entire site is windows hosting, they arent looking to mix in any other
> > > language at the moment. Are there any tutorials or examples of the
> > > same thing but in .ASPX and SQL with C#?
>
> > The concepts apply. I think if you search the group, you may find
> > some samples that you can "cut and paste", but not many.
>
> > -- Larry
>
> > > On Sep 16, 2:14 pm, "[email protected]" <[email protected]>
> > > wrote:
>
> > > > On Sep 16, 12:05 pm, cubangt <[email protected]> wrote:
>
> > > > > I have a map working great on my site as long as i have the markers
> > > > > hard coded with values in my C# code behind.
>
> > > > > I have the following code and works great. But i would like to pass my
> > > > > values in from the database, is there any good tutorials showing how
> > > > > to do this?
>
> > > > Did you see
> > > > these:http://code.google.com/apis/maps/documentation/javascript/v2/articles...
>
> > > > In particular:
> > > > Using PHP/MySQL with Google Maps
> > > > Shows how to use PHP/MySQL and the Google Maps API to create a map
> > > > that polls data from a database and shows as
> > > > markers.http://code.google.com/apis/maps/articles/phpsqlajax.html
>
> > > > Or
> > > > these:http://groups.google.com/group/google-maps-api/web/using-databases-wi...
>
> > > > -- Larry
>
> > > > > I noticed that one possible way is to use XML file to pass
> > > > > the values.. but cant find good examples of how to implement that. Any
> > > > > suggestions would be great.
> > > > > thanks.
>
> > > > > GoogleMap1.Latitude = 32.8030;
> > > > > GoogleMap1.Longitude = -96.7699;
> > > > > GoogleMap1.Zoom = 6;
>
> > > > > GoogleMarker bm = new GoogleMarker();
> > > > > bm.Latitude = 32.8030;
> > > > > bm.Longitude = -96.7699;
> > > > > bm.Text = "Dallas, Tx.";
>
> > > > > GoogleMarker bm1 = new GoogleMarker();
> > > > > bm1.Latitude = 30.0799;
> > > > > bm1.Longitude = -95.4172;
> > > > > bm1.Text = "Spring, Tx.";
>
> > > > > GoogleMarker bm2 = new GoogleMarker();
> > > > > bm2.Latitude = 29.7629;
> > > > > bm2.Longitude = -95.3831;
> > > > > bm2.Text = "Houston, Tx.";
>
> > > > > GoogleMap1.Markers.Add(bm);
> > > > > GoogleMap1.Markers.Add(bm1);
> > > > > GoogleMap1.Markers.Add(bm2);- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--
You received this message because you are subscribed to the Google Groups
"Google Maps API V2" 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-api?hl=en.