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 8487745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:20:17+00:00 2026-06-10T21:20:17+00:00

Hey everyone anyone ever tried similar incident its inside a jquery tab system and

  • 0

Hey everyone anyone ever tried similar incident
its inside a jquery tab system and it works alone or any other place at the website but when inside a tab its getting this offset in some weird manner!

if you tried it or have a solution please post it

Google maps offset

<% if (RentalCaseMap.Any()) { %>
<div id="Kort" class="tab-content">
   <div id="rental_map_canvas" style="width:656px; height:270px"></div>
   <script type="text/javascript" src="/scripts/rentalmap.js"></script>
</div>
<% } %>
....

<input type="hidden" id="HiddenGeoLat" value="<%=CurrentContent.GeoLat %>" />
<input type="hidden" id="HiddenGeoLng" value="<%=CurrentContent.GeoLng %>" />

Then script file

$(window).load(function () {
initialize();
});
function initialize() {
    var jeudanStyles = [{ featureType: "all", elementType: "all", stylers: [{ saturation: -99}]}];

var jeudanMapType = new google.maps.StyledMapType(jeudanStyles,
        { name: "Jeudan" });

var myOptions = {
    zoom: 16,
    disableDefaultUI: true,
    mapTypeId: google.maps.MapTypeId.ROADMAP,
    mapTypeControl: false,
    mapTypeControlOptions: {
        style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
        position: google.maps.ControlPosition.BOTTOM_CENTER
    },
    panControl: true,
    panControlOptions: {
        position: google.maps.ControlPosition.TOP_RIGHT
    },
    zoomControl: true,
    zoomControlOptions: {
        style: google.maps.ZoomControlStyle.LARGE,
        position: google.maps.ControlPosition.LEFT_CENTER
    },
    scaleControl: false,
    scaleControlOptions: {
        position: google.maps.ControlPosition.BOTTOM_CENTER
    },
    streetViewControl: true,
    streetViewControlOptions: {
        position: google.maps.ControlPosition.BOTTOM_CENTER
    }
};
if (document.getElementById("rental_map_canvas") != null) {
    var map = new google.maps.Map(document.getElementById("rental_map_canvas"), myOptions);

    map.mapTypes.set('jeudan_map', jeudanMapType);
    map.setMapTypeId('jeudan_map');

    var locations = [
                { lat: 55.680884, lng: 12.581577, content: '<div class="jeudanparkering">Addresse: Gammel M&oslash;nt 1 - 3<br />Mandag - l&oslash;rdag 06.30-21.00.<br /><a href="../priser-og-aabningstider/">Mere info...</a></div>' }
            ];
    var marker, i;

    var image = new google.maps.MarkerImage('/images/maps-logo-small.png', new google.maps.Size(35, 40), new google.maps.Point(0, 0), new google.maps.Point(35, 40));
    var shadow = new google.maps.MarkerImage('/images/maps-logo-shadow-small.png', new google.maps.Size(74, 37), new google.maps.Point(0, 0), new google.maps.Point(34, 37));
    var shape = {
        coord: [1, 1, 1, 40, 35, 40, 35, 1],
        type: 'poly'
    };

    var infowindow = new google.maps.InfoWindow();

    for (i = 0; i < locations.length; i++) {

        marker = new google.maps.Marker({
            position: new google.maps.LatLng($("#HiddenGeoLat").val(), $("#HiddenGeoLng").val()), /*new google.maps.LatLng(locations[i].lat, locations[i].lng),*/
            map: map,
            shadow: shadow,
            icon: image,
            animation: google.maps.Animation.DROP,
            shape: shape
        });

        marker.content = locations[i].content;

        google.maps.event.addListener(marker, 'click', function () {
            infowindow.setContent(this.content);
            infowindow.open(map, this);
        });
        map.setCenter(marker.position);
    }
};
}
  • 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-10T21:20:18+00:00Added an answer on June 10, 2026 at 9:20 pm
    $("#liKort").click(function () {
            google.maps.event.trigger(map, 'resize');
            map.setCenter(marker.position);
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey everyone. I saw another post on using a specific jQuery UI tab to
Hey everyone I am having a little problem with my jQuery I am trying
hey everyone, here is the site SEE BELOW I have a slight jquery problem
Hey everyone, I'm not the best at Jquery debugging, so I was hoping someone
Hey everyone - I am wondering if anyone could help me out - I
Hey everyone, I made sure there wasn't a similar discussion before posting but forgive
Hey everyone, I was just wondering if anyone knows how to create a UITableviewCell
Hey everyone. I am trying to incorporate a simple UINavigationController into my tab bar
Hey everyone, I'm working on a site and any special characters (&rsquo; &hellip;) turn
UPDATE 11/18/2011 Check the accepted answer. It works and its a life saver! Hey

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.