Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi.I use this code inside an asp.net page. but browser (ff & ie8)don't show map. why?
C#
asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="MapMaker/js/mapmarker.jquery.js"></script>
    <script type="text/javascript">// <![CDATA[
        $(document).ready(function () {

            //set up markers
            var myMarkers = {
                "markers": [
                { "latitude": "35.741967910829295", "longitude": "51.54246568548842", "icon": "img/house.png", "baloon_text": 'This is Texas' }
                ]
            };

            //set up map options
            $("#map").mapmarker({
                zoom: 5,
                center: 'United States',
                markers: myMarkers
            });

        });
        // </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <div id="map" style="width: 550px; height: 450px; border: 2px solid red;"></div>

</asp:Content>


ContentPlaceHolder1 is surrounded by "Head" tag.
I used this source:
http://www.welancers.com/jquery-map-marker-plugin/[^]
Posted
Updated 5-Nov-13 13:39pm
v4
Comments
joshrduncan2012 4-Nov-13 12:52pm    
Why is there a C# tag on this?
mit62 5-Nov-13 19:39pm    
tnx

1 solution

Have a look at the Setting the Scene part of my article: D3.js crash course - Part2[^]

My guess is that you're loading jQuery twice - and most likely two different versions of jQuery - which tends to make things behave unpredictably.

Best regards
Espen Harlinn
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900