Is there a way to insert an adsense block (or any text) into a map, when it is viewed full-screen?

CommentFileSizeAuthor
#2 map-ad-example.png98.31 KBressa
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

zzolo’s picture

Hi @ressa. I am not really sure what this means and what this would be used for?

ressa’s picture

FileSize
98.31 KB

Hey zzolo, I have attached a picture to clarify 8o)

zzolo’s picture

Title: Insert adsense block in full-screen map » Overlay block on map in full-screen

Hi @ressa. Ah, I get it. Thanks for the screenshot. I have not tried to do this with fullscreen, though I have overlayed blocks on top of a map. I would assume this could be done with some CSS and possibly a little Javascript. May want to look at the fullscreen behavior (JS and CSS) to see what it is doing and how to supplement it. Might be necessary to implement your own behavior.

ressa’s picture

Yeah, an image speaks a thousand words 8o)
I am glad to hear you have earlier overlayed blocks on top of a map. I have come up with this snippet:

<div id="fullscreen_map" unselectable="on" style="z-index: 1011; position: absolute; right: 20px; top: 220px;">
  <div id="ad_fullscreen" style="height: 250px; opacity: 0.85; width: 140px;">
    <a href="test">ad script</a>
  </div>
</div>

It will overlay a block on maps, both normal maps and fullscreen, when inserted right after these div's, in the code (I used firebug to do this):

...

<div id="OpenLayers.Control.Permalink_298" class="olControlPermalink" style="position: absolute; z-index: 1009;" unselectable="on">...</div>
<div id="OpenLayers.Control.ScaleLine_300" class="olControlScaleLine olControlNoSelect" unselectable="on" style="position: absolute; z-index: 1010;">...</div>
<div id="fullscreen_map" style="z-index: 1011; position: absolute; right: 20px; top: 220px;" unselectable="on">...</div>

I actually don't mind if the block is shown on both small and fullscreen maps. You wouldn't still have that code lying around by any chance? 8o) Perhaps I can using it as a starting point and share the result in this thread, if I manage to get it to work.

R-H’s picture

Issue summary: View changes

Is there a way to integrate Adsense directly into OpenLayers? I believe that google has an api for adsense and google maps.

https://developers.google.com/maps/documentation/javascript/advertising

milos.kroulik’s picture

R-H: Your comment would be better moved to its own thread because it's unrelated (and also, because it's very old thread).

R-H’s picture

Thanks will do that now Milos.

markwelbar’s picture

check this css full screen overlay

http://www.corelangs.com/css/box/fulloverlay.html

Mark

ressa’s picture

Status: Active » Closed (outdated)