On the other hand, if you've already converted it to custom tiles then
you have full control, and you can use something like my
MCustomTileLayer object to set the opacity of the tiles:
http://maps.forum.nu/v3/gm_customTiles.html
--
Marcelo - http://maps.forum.nu
--
--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
Read again what I wrote in my previous post. MCustomTileLayer has
nothing to do with KML.
> Is this a pay to play object?
The answer to that question is right at the beginning of
MCustomTileLayer.js
Again, read!
--
Marcelo - http://maps.forum.nu
--
> Dave
>
>
>
>
>
>
>
>
>
> On Mon, Nov 21, 2011 at 10:00 AM, Marcelo <marcelo...@hotmail.com> wrote:
> > You cannot modify a KML layer after it's been loaded because it is
> > parsed and rendered from Google's servers. The only way to change it
> > is to use an AJAX call to a server side script that modifies the KML
> > file and then reload it.
>
> > On the other hand, if you've already converted it to custom tiles then
> > you have full control, and you can use something like my
> > MCustomTileLayer object to set the opacity of the tiles:
> >http://maps.forum.nu/v3/gm_customTiles.html
>
> > --
> > Marcelo -http://maps.forum.nu
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-
scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/
>
<title>Google Maps JavaScript API v3 Example: KmlLayer KML</
title>
<script src="http://code.jquery.com/jquery-1.4.4.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/
api/js?sensor=false"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".b_opacity").click(function(){
//this will find all the images in the map canvas container. Normally
you would want to target specific images by the value of src
$("#map_canvas").find("img").css("opacity","0.6")
})
})
function initialize() {
var chicago = new google.maps.LatLng(41.875696,-87.624207);
var myOptions = {
zoom: 11,
center: chicago,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new
google.maps.Map(document.getElementById("map_canvas"), myOptions);
var ctaLayer = new google.maps.KmlLayer('https://s3-us-
west-1.amazonaws.com/alsfdmap/FiveLevels/WebKml.kml');
ctaLayer.setMap(map);
}
</script>
</head>
<body onload="initialize()">
<div id="map_canvas" style="width: 600px;height: 600px;"></div>
<input type="button" value="dim the lights" class="b_opacity">
</body>
</html>
On Nov 22, 9:36 am, Marcelo <marcelo...@hotmail.com> wrote:
> On Nov 22, 9:48 am, Dave Herndon <kitethew...@gmail.com> wrote:
>
> > Cool,
> > As far as the MCustomTileLayer object. I don't see any reference to KML
> > in the source code. I suspect the code is not out where you can see it in
> > the source code correct?
>
> Read again what I wrote in my previous post. MCustomTileLayer has
> nothing to do with KML.
>
> > Is this a pay to play object?
>
> The answer to that question is right at the beginning of
> MCustomTileLayer.js
> Again, read!
>
> --
> Marcelo -http://maps.forum.nu
Strictly speaking, it doesn't. Googles servers read your KML and
render into the dozen or so tiles that fit the current API map. When
you pan or zoom, the API fetches new tiles from Google.
If you must go your way, try listening for map idle event to re-
trigger your CSS tweak