Friday, 8 December 2017

openlayers 2 - Google Maps layer copyright popup every time map updated / user input


I have used a Google Maps hybrid layer in Openlayers in my HTML5 iOS app for months now and it worked perfectly. Just recently they changed something because the 'Map data...' line at the bottom looks different (light grey background) and whenever you touch the screen or the map position is updated via navigator.geolocation.getCurrentPosition() the map data copyright box pops up.


Has anyone else experienced this? If so I'd really appreciate any info on any solutions/workarounds you've found.



Answer



I saw this answer on the Openlayers mailing list a few days ago. You need to make sure you are providing a version, such as v=3.6:




Then it should disappear.


-- May 17, 2012 edit:


I just saw that this problem has returned on the OpenLayers mailing list. A suggested fix (which worked for me) is to paste the following into the openlayers style.css



.olLayerGooglePoweredBy.olLayerGoogleV3.gmnoprint {
visibility:hidden;
}

No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...