Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8349887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:08:33+00:00 2026-06-09T08:08:33+00:00

The map is loaded correctly without marker object ,But it doesn’t load when I

  • 0

The map is loaded correctly without marker object ,But it doesn’t load when I add Marker object on this structure here my

<!doctype html>
<html>
    <head>
    <script type="text/javascript"
    src="http://maps.google.com/maps/api/js?sensor=false"></script>

    <script src="jquery-1.7.2.min.js" type="text/javascript"></script>
    <script src="script.js" type="text/javascript"></script>
    <script type="text/javascript"> 

        $.geolocation.find(function(location) {
            var lat = location.latitude;
            var lng = location.longitude;

            var map = new google.maps.Map($('#mapDiv').get(0), {
                center: new google.maps.LatLng(lat, lng),
                zoom: 13,
                mapTypeId: google.maps.MapTypeId.ROADMAP
            });

            var pinColor = "FE7569";
            var pinImage = new google.maps.MarkerImage("http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=%E2%80%A2" + pinColor,
            new google.maps.Size(21, 34),
            new google.maps.Point(0,0),
            new google.maps.Point(10, 34));
            var pinShadow = new google.maps.MarkerImage("http://chart.apis.google.com/chart?chst=d_map_pin_shadow",
            new google.maps.Size(40, 37),
            new google.maps.Point(0, 0),
            new google.maps.Point(12, 35))

            var marker= new google.maps.Marker({
                position: new google.maps.LatLng(lat, lng),
                map: map,
                icon: pinImage,
                shadow: pinShadow 
            });        
        });
    </script>
</head>
 <body>
    <div id="mapDiv" style="width:700px; height: 500px;"></div>
 </body>
</html>

The script which is included in the page script.js

      (function($){

            $.extend($.support,{
                geolocation:function(){
                    return $.geolocation.support();
                }
            });

            $.geolocation = {        
                find:function(success, error, options){
                    if($.geolocation.support()){
                        options = $.extend({highAccuracy: true, track: false}, options);
                        ($.geolocation.object())[(options.track ? 'watchPosition' : 'getCurrentPosition')](function(location){
                            success(location.coords);
                        }, function(){
                            error();
                        }, {enableHighAccuracy: options.highAccuracy});     
                    }else{
                        error();                
                    }
                },
                object:function(){
                    return navigator.geolocation;
                },
                support:function(){
                    return ($.geolocation.object()) ? true : false;
                }
            };

        })(jQuery);

I need to include the marker with the google map
another issue that this code is running only on Firefox and IE ,but it doesn’t run on Google Chrome

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T08:08:34+00:00Added an answer on June 9, 2026 at 8:08 am

    Take a look at this, I think this is solved, your error was in the url parameters and now it is working in Chrome too. You can also change the color of your marker by replacing FE7569 according to your needs.

    Eg: 73B5EB enter image description here or 33DE61 enter image description here

    Another thing you can do is to put a text in the marker like this:

    http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=You%20are%20here|FE7569

    Eg: enter image description here


    Live demo of your code but corrected:

    http://jsfiddle.net/oscarj24/sPsxh/

    Hope this helps 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have problem with my map. Map was working correctly about 5 months ago.
When I use the TTLauncher to call a TTTableViewController the table is loaded correctly
I'm trying to display a Google Map on a JQuery Mobile page, but am
I have this .htaacces: # Don't show directory listings for URLs which map to
I am trying load map region and MKMapView delegate methods are not being called
I don't think I am understanding this correctly, I added the annotation to the
I don't know the best way to ask this, but let me explain the
Coles Notes version: index.php?map_id=foo is loaded into iframe on www.not-my-domain.com. index sets SESSION['map_id'] =
Map<Integer, Map<String, String>> movie = new HashMap<Integer,Map<String, String>>(); Map<String,String> sub = new HashMap<String,String>(); I'm
Map<String, List<String>> words = new HashMap<String, List<String>>(); List<Map> listOfHash = new ArrayList<Map>(); for (int

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.