I found strange words, (have, here, imagery, sorry) that were supposed not to be on my site, being taken as keywords by the crawler from Google
It seems like Google is having errors when crawling pages that use Google maps, so it is taking the error strings as great keywords!
I am using openlayers to show maps in both sites. The code is like this
<script src="http://openlayers.org/api/OpenLayers.js"></script>
<script src="http://maps.google.com/maps/api/js?v=3&sensor=false"></script>
<script type="text/javascript">
$(function() {
$("#mapOuter").html('<div class="thumbnail"><div id="map" style="height:250px"></div></div>')
map = new OpenLayers.Map("map")
//map.addLayer( new OpenLayers.Layer.OSM ("OpenStreeetMap") )
map.addLayer( new OpenLayers.Layer.Google("Google v3" ) )
vectors = new OpenLayers.Layer.Vector("vector")
map.addLayer( vectors )
map.addControl( new OpenLayers.Control.LayerSwitcher() );
map.addControl( new OpenLayers.Control.Navigation({documentDrag:true}) );
map.addControl( new OpenLayers.Control.PanZoom() );
var in_options = {
'internalProjection': map.baseLayer.projection,
'externalProjection': new OpenLayers.Projection("EPSG:4326")
};
var lon=-57.954900
var lat=-34.917000
map.setCenter(new OpenLayers.LonLat(lon, lat) // Center of the map
.transform(
new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984
new OpenLayers.Projection("EPSG:900913") // to Spherical Mercator Projection
), 15 // Zoom level
)
});
</script>
How can I do to fix this "error" so the Google crawler can take good content from my site?
Bonus Google Search (to show that the errors are indexed)
UPDATE, "Solution" applied:
I had one different map per each page in my site, I ended up converting all maps to images and only keep one interactive map where I really needed user interaction with coordinates and mapping stuff. The solution I used led me to create and opensource osm-static-maps. Hope it helps somebody!
The site got several improvements:
- Got rid of this awkward words in google webmasters.
- More relevant SEO using static images with "alt" html img attribute instead of "unindexable" js map.
- Faster page loading (got rid of all mapping libraries and tile loading).
- Faster js performance (less js to process by client)
- Improved user experience: scrolling page caused map zooming instead of actually scrolling (you can think that this could be solved by disabling map scroll to zoom, but it lead to a user expecting to zoom the map on scroll, both ways were ok and wrong at the same time).
On the downside, I found:
- Less user interactivity (boring page).
- Less context on the map (less informative map).
This two things could be "fixed" loading the map when the user clicks the map img. The bad side is that if the user clicks the map img unintentionally, the map load can be seen as unexpected behaviour by the user.
Edit2
I made an opensource project out of this. Check out! https://github.com/jperelli/osm-static-maps