ASP map example

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
FP_Oz
Newbie
Newbie
Posts: 22
Joined: Mon Oct 01, 2007 12:00 am

ASP map example

Post by FP_Oz » Fri Mar 14, 2008 2:22 am

Hi

I would like to use the TeeChart control to display a shapefile on a web page. Your map example, however, is based on a Windows form. Consider also that we are generating the jpg for the chart in memory due to server constraints:

Public Class TestChart1
Shared Function Generate() As String
Dim chart As Chart
chart = New Chart()


... more formating statements

Dim tempStream As New MemoryStream()
chart.Export.Image.PNG.Save(tempStream)
Dim ChartName As String = Guid.NewGuid.ToString
HttpContext.Current.Session(ChartName) = tempStream

Return ChartName

End Function
End Class

I would appreciate it if you could indicate which section to replace in this code so that it will work like a map control and allow loading of shp files.

Thanks
Chris

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Mar 14, 2008 9:47 am

Hi Chris,

Have you checked the ASP.NET demo shipped with TeeChart for .NET v2/v3? Full project can be found at C:\Program Files\Steema Software\TeeChart for .NET v3\TeeChartForNET and maps example at C:\Program Files\Steema Software\TeeChart for .NET v3\TeeChartForNET\Interacting with Charts\Mapping.

Hope this helps!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

FP_Oz
Newbie
Newbie
Posts: 22
Joined: Mon Oct 01, 2007 12:00 am

Post by FP_Oz » Mon Mar 17, 2008 12:32 am

Hi Narcis

Yes, as I have stated in my posting, I have seen and investigated the Windows form sample that is included with your software. I asked for a code sample that will work with ASP. Please go back to my original posting and read it again carefully.

Thanks
Chris

FP_Oz
Newbie
Newbie
Posts: 22
Joined: Mon Oct 01, 2007 12:00 am

Post by FP_Oz » Mon Mar 17, 2008 12:36 am

Narcis

To clarify further, the sample that is included is an ASP project. However the place where the TeeChart is used as a map control is a Windows form. Have a look and you will see what I mean. If I apply the relevant part of the forms code to my VB code behind the ASP forms it does not work. therefore I am asking you to point me to a place where the control is being used an an ASP page. Also, I need to generate the controls jpg in memeory (again, read my oroginal post carefully). Hope that clarifies it more.

Chris

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Mar 17, 2008 8:44 am

Hi Chris,

The example I mentioned uses WebForms, not WinForms and is the same you can find here.

For saving chart images in memory please read Tutorial 9 - TeeChart and WebChart and ASP.NET, specially the TempChart property - File, Session, Cache or Httphandler section.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

FP_Oz
Newbie
Newbie
Posts: 22
Joined: Mon Oct 01, 2007 12:00 am

Post by FP_Oz » Tue Mar 18, 2008 1:29 am

Narcis

The link you specify takes me to the ASO .NET Samples. the only entry which is about mapping it the point "Interacting with Charts / Mapping / Interactive Maps". I can see the sample under "View Sample" however when I click on "View C# Code" I get a blank screen. This also happens on my locally installed version of the ASP.NET Samples. Could you please point me to a working example of the TeeChart control in ASP.NET. Also, I would like the example to be in VB.NET not C#.

Thanks
Chris

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Mar 18, 2008 8:32 am

Hi Chris,

If I understand this correctly the example already works. What doesn't work is the source code link. Anyway, you should find the mapping example sources at C:\Program Files\Steema Software\TeeChart for .NET v3\TeeChartForNET\Interacting with Charts\Mapping.

At the moment we don't have the ASP.NET available in VB.NET. However, VB.NET version of the full features demo is available at C:\Program Files\Steema Software\TeeChart for .NET v3\Examples\DemoProjectVB.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply