Code Monkey home page Code Monkey logo

Comments (5)

petkivim avatar petkivim commented on August 16, 2024

Hi,

Thanks for contacting me. It's nice to hear that you're using my Embed Google Map plugin.

Is the map on a tab that's invisible (~not active) when the page loads? If yes, that's a known issue with Google Maps - only maps on visible (~active) tab get centered correctly.

Best regards,
Petteri

Date: Wed, 1 Apr 2015 23:50:10 -0700
From: [email protected]
To: [email protected]
Subject: [embed-google-map] Map marker top left and corner (#1)

Site is Joomla 3.4.1 with Flexicontent and T3 Framework on local host. Plugin is placed within No Number slider and tabs and worked fine, however, a recent change is the maps are not centering correctly i.e. the red marker is in the top left hand corner of the map. When the page is refreshed the marker and page correctly center but not on first load.


Reply to this email directly or view it on GitHub.

from embed-google-map.

m3enkech avatar m3enkech commented on August 16, 2024

Hi,
I'd like to thank you for this plugin and looking a help with Long,Lat ... how can I change the default values?

from embed-google-map.

Norm2015 avatar Norm2015 commented on August 16, 2024

Thanks Petteri

Yes, it is an invisible tab and I understand.

Norm

From: Petteri Kivimäki
Sent: Thursday, April 02, 2015 7:59 PM
To: petkivim/embed-google-map
Cc: Norm2015
Subject: Re: [embed-google-map] Map marker top left and corner (#1)

Hi,

Thanks for contacting me. It's nice to hear that you're using my Embed Google Map plugin.

Is the map on a tab that's invisible (~not active) when the page loads? If yes, that's a known issue with Google Maps - only maps on visible (~active) tab get centered correctly.

Best regards,
Petteri

Date: Wed, 1 Apr 2015 23:50:10 -0700
From: [email protected]
To: [email protected]
Subject: [embed-google-map] Map marker top left and corner (#1)

Site is Joomla 3.4.1 with Flexicontent and T3 Framework on local host. Plugin is placed within No Number slider and tabs and worked fine, however, a recent change is the maps are not centering correctly i.e. the red marker is in the top left hand corner of the map. When the page is refreshed the marker and page correctly center but not on first load.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.


This email has been checked for viruses by Avast antivirus software.
http://www.avast.com

from embed-google-map.

petkivim avatar petkivim commented on August 16, 2024

There's a workaround that should fix the problem.

Place the {google_map}...{/google_map} tags inside a p element and add the below JavaScript to your site.

<p class="map"> {google_map}...{/google_map} </p>

$('.map', p).show(250, function() { var i = $(this).find('iframe'); var is = $(i).attr('src'); i.delay(250).attr('src', is); });

The script takes the src attribute of the I frame, then waits 250 milliseconds before setting the src again (to what it already is of course). This simple dom change triggers something in Google's code that causes the map to re-center itself.

from embed-google-map.

petkivim avatar petkivim commented on August 16, 2024

@m3enkech I created a new issue #2 for your question. The answer can be found there.

from embed-google-map.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.