1 Replies - 8108 Views - Last Post: 06 March 2012 - 04:32 AM

#1 amit2011  Icon User is offline

  • D.I.C Head

Reputation: -13
  • View blog
  • Posts: 64
  • Joined: 17-March 11

Map not visible on webpage using MS SILVERLIGHT ?

Posted 05 March 2012 - 09:58 PM

I am trying to show a map using arcgis API for silverlight. Still not able to view map on my webpage.

http://help.arcgis.c...00000004000000/

I think the problem is regarding .xaml.cs page
It is showing an error under IniatlizedComponent i.e

MainPage.xaml.cs
namespace SilverlightApplication17
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            //InitializeComponent();// by commenting it, the program is running with no errors, but MAP is not visible
            //without commenting it the error is [b]"C#: unkown Method InitializeComponent()// "[/b]
       
        }
        
    }

}



No error is coming under this ,xaml page.I've added refernces and it is showing esri.
I read somewhere that the problem is of webbrowser, but i am using IE8.
It is not showing any error in design view i.e esri icon is visible(i resolved that error)
What should I do?

MainPage.xaml
<UserControl x:Class="SilverlightApp.Page"    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     xmlns:esri="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="198" d:DesignWidth="536" DataContext="{Binding}">
    <Grid x:Name="LayoutRoot" Background="White">
        
        <esri:Map x:Name="MyMap" Background="White" >
            <esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
        </esri:Map>
        

    </Grid>
</UserControl>


This post has been edited by amit2011: 05 March 2012 - 09:59 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Map not visible on webpage using MS SILVERLIGHT ?

#2 amit2011  Icon User is offline

  • D.I.C Head

Reputation: -13
  • View blog
  • Posts: 64
  • Joined: 17-March 11

Re: Map not visible on webpage using MS SILVERLIGHT ?

Posted 06 March 2012 - 04:32 AM

i got the solution!!
It was some problem with <UserControl x:Class="SilverlightApp.Page">
IT WAS NOT MATCHING WITH THE ACTUAL SILVERLIGHT APLLICATION NAME:

RESOLVED...
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1