Replace Google map

2

My question is how to use the google maps library with another map, or image.

I found an interesting example that left me pensive, but I could not find an answer so far.

Here's the example: link

And some images:

I've seen another example with game maps, like the GTA, could someone explain me, or tell me a site or tutorial that shows something on the subject? Because in the library documentation I could not find how to do it.

Thankful,

    
asked by anonymous 29.04.2015 / 02:17

1 answer

3

I believe using the google maps library with another image is not possible, but there are some similar tools that might help, such as openLayers which is free, and features quite advanced features.

In this link you can find some examples of what can be done with it. The documentation seems to be very complete, and does not seem very difficult to implement.

See this example, used in quick start : / p>

<!doctype html>
<html lang="en">
  <head>
    <link rel="stylesheet" href="http://openlayers.org/en/v3.4.0/css/ol.css" type="text/css">
    <style>
      .map {
        height: 400px;
        width: 100%;
      }
    </style>
    <script src="http://openlayers.org/en/v3.4.0/build/ol.js"type="text/javascript"></script>
    <title>OpenLayers 3 example</title>
  </head>
  <body>
    <h2>My Map</h2>
    <div id="map" class="map"></div>
    <script type="text/javascript">
      var map = new ol.Map({
        target: 'map',
        layers: [
          new ol.layer.Tile({
            source: new ol.source.MapQuest({layer: 'sat'})
          })
        ],
        view: new ol.View({
          center: ol.proj.transform([37.41, 8.82], 'EPSG:4326', 'EPSG:3857'),
          zoom: 4
        })
      });
    </script>
  </body>
</html>

 
    
29.04.2015 / 18:02