I have created user control which contains google map .
code in user control is as follows
Expand|Select|Wrap|Line Numbers
- <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>
Expand|Select|Wrap|Line Numbers
- <div id="map_canvas" style="float: left; width: 100%; height: 300px; border: solid 1px black;" > </div>
Me.Page.ClientScript.RegisterStartupScript(Me.GetT ype(), "FunctionCall", "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