Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Map api added span(BESbewy) at page load, why??

Tags:

google-maps

Google map api added a span using some specific word with some css style that will break my page content in mobile site

like image 788
Muhammad sohail Afzal Avatar asked Jun 01 '16 10:06

Muhammad sohail Afzal


People also ask

Why this page can't load Google Maps correctly?

Unless a valid API key is present, the map will be displayed in a lower resolution and will have a watermark on it. If the credit card linked to the account is invalid or the number of free map views is surpassed, the "This Page Can't Load Google Maps Correctly" error will show up.

Which event is triggered when the map is continuously moved and dragged?

bounds_changed event fires repeatedly when the map is panning or dragging; I'd expect it to fire only when the move has finished.

What is the daily limit for Google Maps API?

While there is no maximum number of requests per day, the following usage limits are in place for the Maps JavaScript API: 30,000 requests per minute. 300 requests per minute per IP address. In the Google Cloud Console, this quota is referred to as Map loads per minute per user.


2 Answers

Normally in google maps Api "BESBEWY" occurs at the end of span, on that span some CSS id applied, try this:

$('body > span').each(function () {
    if ($(this).text() === 'BESbewy') {
      $(this).hide();
    }
  });
like image 109
Muzammil Naseer Avatar answered Sep 19 '22 12:09

Muzammil Naseer


instead of using jQuery and loops you could use XPath to get the element ( and then check if it is exist obviously):

var unwantedSpan = document.evaluate(
    '//body/span[text()="BESbswy"]', document, 
    null, XPathResult.FIRST_ORDERED_NODE_TYPE, null
).singleNodeValue

Or if all you care is Chrome browser you could just use

var unwantedSpan = $('//body/span[text()="BESbswy"]')

This span is added in mobile only and done by google maps for calculations purposes.

like image 31
jony89 Avatar answered Sep 22 '22 12:09

jony89