Page 1 of 1
ASP map example
Posted: Fri Mar 14, 2008 2:22 am
by 13046874
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
Posted: Fri Mar 14, 2008 9:47 am
by narcis
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!
Posted: Mon Mar 17, 2008 12:32 am
by 13046874
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
Posted: Mon Mar 17, 2008 12:36 am
by 13046874
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
Posted: Mon Mar 17, 2008 8:44 am
by narcis
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.
Posted: Tue Mar 18, 2008 1:29 am
by 13046874
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
Posted: Tue Mar 18, 2008 8:32 am
by narcis
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.