Hi,
I have created user control which contains google map .
code in user control is as follows
HTML code:
Call to Initialize() function is from code behind(.ascx.cs ) using
Me.Page.ClientS cript.RegisterS tartupScript(Me .GetType(), "FunctionCa ll", "initialize();" )
Everythings works fine when single instance for user control is used in parent page (.aspx page).
But when I tried to used this user control multiple times in page ,only map for 1st instance is showing. But for other instances it is not showing anything but blank
I want to display google maps for all instances of the user control
For ex when user control is used 4 times,4 maps should be displayed
Thanks & Regards,
Anirudha Deshpande
I have created user control which contains google map .
code in user control is as follows
Code:
<script type="text/javascript" language="javascript"> var map; fucntion intialize(){ map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions); //set the default center map.setCenter(myLatlng); //set the default zoom map.setZoom(initialZoom); //Set the map type map.setMapTypeId(google.maps.MapTypeId.SATELLITE); } </script>
Code:
<div id="map_canvas" style="float: left; width: 100%; height: 300px; border: solid 1px black;" > </div>
Me.Page.ClientS cript.RegisterS tartupScript(Me .GetType(), "FunctionCa ll", "initialize();" )
Everythings works fine when single instance for user control is used in parent page (.aspx page).
But when I tried to used this user control multiple times in page ,only map for 1st instance is showing. But for other instances it is not showing anything but blank
I want to display google maps for all instances of the user control
For ex when user control is used 4 times,4 maps should be displayed
Thanks & Regards,
Anirudha Deshpande
Comment