Hey everyone,

I'm a relative novice to the Google Maps development side of things, so 
please bear with me. I've spent most of the day working on implementing an 
image map for my website. After much trial and error I have  (more or 
less) successfully employed the V3 API to produce the map available here: 
http://amalurfoundry.com/library/geography/faelands. 

My difficulty emerges when attempting to implement js commands for 
boundaries, markers, and overlays. I seem unable despite my best efforts to 
determine what latlng coordinate system my map uses. In order to 
effectively utilize overlays, markers, and other scripts I need to be 
comfortable with the dimensions of region my image map inhabits. 

Some (hopefully) useful background information. I used the photoshop automatic 
tile cutter<http://mapki.com/mediawiki/index.php?title=Automatic_Tile_Cutter> 
script 
to divide my master image into four zoom levels ranging from 1 to 4, with 
the fourth zoom tier comprised of 32 tiles, with x and y values for each 
zoom tier counting upwards from 1. 

My code that prouduces the map is effectively summarized as:

<html>
<style type="text/css">#map_canvas img {max-width: none;}</style>
<div id="map_canvas" style="width: 862px; height: 700px;"></div>

<script type="text/javascript" 
   src="http://maps.googleapis.com/maps/api/js?sensor=false";>
</script>

<script type="text/javascript">
   var faelandsTypeOptions = {
      getTileUrl: function(coord,zoom) {
      return "http://amalurfoundry.com/maps/faelands/"; + zoom + "_" + 
coord.x + "_" + coord.y + ".jpg";
   },
   tileSize: new google.maps.Size(256, 256),
   maxZoom: 4,
   minZoom: 1,
   name: "Faelands"
};

var faelandsMapType = new google.maps.ImageMapType(faelandsTypeOptions);

var myLatLng = new google.maps.LatLng(-70,125);
var myOptions = {
center: myLatLng,
zoom: 1,
streetViewControl: false,
mapTypeControl: false
   };
   
var map = new 
google.maps.Map(document.getElementById("map_canvas"),myOptions);
map.mapTypes.set('faelands', faelandsMapType);
map.setMapTypeId('faelands');
</script>
</html>

The starting myLatLng values of (-70,125) were chosen simply because they 
produced an attractive initial alignment of the map. I am unable, however, 
to determine any sort of rhyme or reason for how this coordinate system 
works, or why my custom map does not originate from (0,0) as suggested by 
the API documentation 
here<http://code.google.com/apis/maps/documentation/javascript/maptypes.html#MapCoordinates>.
 
I need a straightforward way to manually specify the region that my map 
will occupy so that I can effectively control its underlying coordinate 
plane. Again, I am very much a novice here, so your help and your patience 
are very much appreciated. 

Thanks,
Andrew

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-maps-js-api-v3/-/-u4_51urZE4J.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to