1

Is there a way to add locations and info windows to my own map in .tif format? I'm using MySQL and PHP. Can I use Google Maps API pins but not their map? I thought I can put my georeferenced map (WGS84) and add Google Maps API pins on it. Is that possible and if it is not with Google Maps API, maybe you can recommend me some other way?

Thank you.

2

You can use the Google Maps API v3 with Ground Overlays (your tiff image >better is jpg or png for web browsers)

In this example you can see the the imagebounds is the referencing the image.

http://code.google.com/apis/maps/documentation/javascript/examples/groundoverlay-simple.html

      var imageBounds = new google.maps.LatLngBounds(
          new google.maps.LatLng(40.712216,-74.22655),
          new google.maps.LatLng(40.773941,-74.12544));

      var oldmap = new google.maps.GroundOverlay(
      "http://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg",
      imageBounds);
  oldmap.setMap(map);

Markers can be added to the Google Map that appear on your map(tiff/jpg/png) http://code.google.com/apis/maps/documentation/javascript/examples/infowindow-simple.html

If your Marker Pins are coming from your MySQL database (using PHP) - see this method for the process http://code.google.com/apis/maps/articles/phpsqlajax_v3.html

  • I just forgot to ask, so if I can use jpg, does that mean that my image (map) doesn't need to be georeferenced? – againstflow Feb 9 '12 at 0:10
  • you still need imagebound for any format of image to be georeferenced as a ground overlay. – Mapperz Feb 9 '12 at 14:19
  • Yes, and I can find out that bounds for jpg images if I don't have it by overlaying image in Google Earth and finding out 4 corners coordinates, is that correct? – againstflow Feb 9 '12 at 19:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.