On Tuesday, July 13, 2010 2:58:40 PM UTC-6, Marc wrote:
> I am using a small map just 250W x 150H. My preferance is to shrink
>
> everything porportionalty but how? Or I have managed to make size
>
> adjustments on everything except the markers. How can I resize the
>
> markers, and remove the shadow. I could put the zoom controls back if
>
> they can be shrink too. Any help would be greatly appreciated. Here is
>
> my code.
>
>
>
> <!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">
>
> <html>
>
> <head>
>
> <meta http-equiv="Content-Type"
>
> content="text/html; charset=iso-8859-1">
>
>
>
>
>
> <style type="text/css">
>
> * {margin:0;padding:0;}
>
> #map_container {position:relative;margin:1px;}
>
> #map_canvas {width:250px;height:150px;border:1px solid black;}
>
>
>
> }
>
>
>
> <!--
>
> .style1 {font-size: 14px}
>
>
>
> }
>
> .style17 {font-size: 36px}
>
> -->
>
> </style>
>
>
>
>
>
> <script type="text/javascript" src="http://maps.google.com/maps/api/js?
>
> sensor=false"></script>
>
> <script type="text/javascript">
>
> var map;
>
> function initialize() {
>
> var map_center = new google.maps.LatLng(37.3190500, -119.5564800);
>
> var store1 = new google.maps.LatLng(37.321664, -119.563259);
>
> var store2 = new google.maps.LatLng(37.318913, -119.549177);
>
> var store3 = new google.maps.LatLng(37.318088, -119.550151);
>
> var store4 = new google.maps.LatLng(37.315256, -119.563599);
>
> var store5 = new google.maps.LatLng(37.319600, -119.548500);
>
>
>
>
>
> var myOptions = {
>
> zoom: 14,
>
> center: map_center,
>
> disableDefaultUI: true,
>
> navigationControl: false,
>
> scaleControl: false,
>
> mapTypeId: google.maps.MapTypeId.ROADMAP
>
> }
>
> map = new google.maps.Map(document.getElementById("map_canvas"),
>
> myOptions);
>
>
>
> var marker1 = new google.maps.Marker({
>
> position: store1,
>
> map: map,
>
> title:"N1"
>
> });
>
> var marker2 = new google.maps.Marker({
>
> position: store2,
>
> map: map,
>
> title:"N2"
>
> });
>
> var marker3 = new google.maps.Marker({
>
> position: store3,
>
> map: map,
>
> title:"C1"
>
> });
>
> var marker4 = new google.maps.Marker({
>
> position: store4,
>
> map: map,
>
> title:"C2"
>
> });
>
> var marker5 = new google.maps.Marker({
>
> position: store5,
>
> map: map,
>
> title:"J1"
>
> });
>
> google.maps.event.addListener(marker1, 'click', function() {
>
> map.set_center(store1);
>
> map.set_zoom(10);
>
> });
>
> google.maps.event.addListener(marker2, 'click', function() {
>
> map.set_center(store2);
>
> map.set_zoom(10);
>
> });
>
> google.maps.event.addListener(marker3, 'click', function() {
>
> map.set_center(store3);
>
> map.set_zoom(10);
>
> });
>
> google.maps.event.addListener(marker4, 'click', function() {
>
> map.set_center(store4);
>
> map.set_zoom(10);
>
> });
>
> google.maps.event.addListener(marker5, 'click', function() {
>
> map.set_center(store5);
>
> map.set_zoom(10);
>
> });
>
> }
>
> </script>
>
>
>
> <center>
>
> <body onload="initialize()"><center>
>
> <div id="map_container">
>
> <div id="map_canvas"></div></div>
>
> </body>
>
> </html>
I realize this is an old thread, but in the process of trying to figure out how
to shrink my icons so they are an appropriate size for my map I discovered this
solution:
If you constructed your map in Google Earth, in the Get Info (or Properties if
you are PC), choose >Style,Color and from there you can adjust the size and
transparency of your icon. It maintains its size when uploaded into Google
Maps. Quick and easy solution, no code :)
--
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/-/4HGLdz7tAWcJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.