Re: [Google Maps API v3]

2010-05-10 Thread Jack Berberette
Brad that worked like a charm!  Thanks for hanging in there with me.  And
thanks to everyone who helped with thisI really can't begin to say how
grateful I am to have found such a cool group of people!  I am not a
programmer but am doing the best I can to learn enough to be of help for the
agency.

Out of curiosity...does anyone know how to set the colors for the markers
based on the feed?  Like Red for Hazmat, Green for RichmondTraffic, etc...
 I found a bunch of information but it looked like it only applied to layers
with static points.  Is there a way to basically set the marker from feed
name?

Once againthanks to everyone...my team mates are going to be so excited
about this!

You guys Rock!

Jack
VIPER Program Manager
Virginia Department of Emergency Management
https://cop.vdem.virginia.gov/viper



On Mon, May 10, 2010 at 10:14 PM, Brad  wrote:

> If RichmondTraffic is the only one giving you issues, than you can
> change this:
>   RichmondTraffic = new google.maps.KmlLayer('
> http://map.richmondgov.com/Bing/Traffic/georssfeed.ashx');
>
> to this:
>   RichmondTraffic = new google.maps.KmlLayer('
> http://map.richmondgov.com/Bing/Traffic/georssfeed.ashx
> ',{preserveViewport:true});
>
> (you might consider adding ",{preserveViewport:true}" to all the
> KmlLayer calls as that will maintain the viewport when all the layers
> are added removed - this isn't an issue now but could be in the future
> depending on if the feed content changes)
>
> On May 10, 6:51 pm, Jason Sanford  wrote:
> > I copy and pasted your code and made some changes to it. I'm still having
> > issues with your traffic layer acting weird when toggling it but the
> other
> > two layers toggle fine.
> >
> > http://test.geojason.info/viper.html
> >
> > You can see the code there and compare to yours.
> >
> > On Mon, May 10, 2010 at 8:45 PM, Jack Berberette 
> wrote:
> > > Thanks for taking your time in this Brad :)  I have implemented the
> changes
> > > but I must something wrong because the map area is just grey now.
>  Here's
> > > the link to the page:http://www.gamecarver.com/viperapp3.html
> >
> > > Here's the link to a page that has the maps on:
> > >http://www.gamecarver.com/viperapp2.html(this was my first attempt)
> >
> > > Here's the code after the changesI'm really sorry to be a burden:
> >
> > > 
> > > 
> > > 
> > > 
> > > VIPER Traffic and Hazmat LIVE
> > > http://maps.google.com/maps/api/js?sensor=true";>
> > > 
> > > var initialLocation;
> > > var statepolice = new google.maps.LatLng(37.502168, -77.542212);
> > > var Hazmat;
> > > var RichmondTraffic;
> > > var StateShelters;
> > > var trafficLayer;
> > > var map;
> >
> > > function toggleLayer(layer) {
> > >if (layer.getMap()) {
> > >  layer.setMap(null);
> > >} else {
> > >  layer.setMap(map);
> > >}
> > >  }
> >
> > > function initialize() {
> > >   var myOptions = {
> > > zoom: 14,
> > > mapTypeId: google.maps.MapTypeId.ROADMAP
> > >   };
> > >   var map = new google.maps.Map(document.getElementById("map_canvas"),
> > > myOptions);
> > >   var map = new google.maps.KmlLayer('
> > >https://cop.vdem.virginia.gov/gis_feeds/GeoRSS2.ashx'<
> https://cop.vdem.virginia.gov/gis_feeds/GeoRSS2.ashx%27>
> > > );
> > >   Hazmat.setMap(map);
> > >   var map = new google.maps.KmlLayer('
> > >http://map.richmondgov.com/Bing/Traffic/georssfeed.ashx'<
> http://map.richmondgov.com/Bing/Traffic/georssfeed.ashx%27>
> > > );
> > >   RichmondTraffic.setMap(map);
> > >   var map = new google.maps.KmlLayer('
> > >https://cop.vdem.virginia.gov/gis_feeds/ShelterGeoRSS.ashx'<
> https://cop.vdem.virginia.gov/gis_feeds/ShelterGeoRSS.ashx%27>
> > > );
> > >   StateShelters.setMap(map);
> > >   var map = new google.maps.TrafficLayer();
> > >   trafficLayer.setMap(map);
> >
> > >   // Safari supports the W3C Geolocation method
> > >   if(navigator.geolocation) {
> > > navigator.geolocation.getCurrentPosition(function(position) {
> > >   initialLocation = new
> > > google.maps.LatLng(position.coords.latitude,position.coords.longitude);
> > >   var placeMarker = new google.maps.Marker({
> > > position: initialLocation,
> > > map: map,
> > >   });
> > >   map.setCenter(initialLocation);
> > > }, function() {
> > >   handleNoGeolocation(browserSupportFlag);
> > > });
> > >   } else {
> > > // Browser doesn't support Geolocation
> > > handleNoGeolocation();
> > >   }
> >
> > >   function 

[Google Maps API v3] Re: Dose MarkerManager works?

2010-05-10 Thread TK

Yes. It might be better to use utility library for anyone who wants to
do so.

But even if there's 2 markers located very close each other, those 2
markers overlap when you zoom out the map. And you will not be able to
click the marker behind the other one, and you won't be able to see it
at all.
I think automatic clustering is a necessary function.

Yes. It shows very slow. Also KsGmaps already finished its support, I
'm now trying with API3...


On May 11, 5:28 am, Rossko  wrote:
> > Sorry, I mean -  I don't know why Google Maps JavaScript API dosen't
> > support something like this.
>
> For a lot of people, it's just unwanted bloat.
> For others, it won't work the way they want - there is more than one
> way to cluster and several variables in the way it works.
>
> Anyone who wants to add it,  can easily add it.
> Anyone who wants to modify it, can do so.
>
> >http://www.shift.jp.org/en/map/
> > This is a sample of v2 version of automatic clustering depends on zoom
>
> level.
>
> Yes, but its not built-in to the API.
> It uses an add-on script for the API, KsGmaps.
> It gives me slow script errors.
>
> --
> 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-maps-js-api...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-maps-js-api-v3+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-maps-js-api-v3?hl=en.

-- 
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-maps-js-api...@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.



Re: [Google Maps API v3]

2010-05-10 Thread Brad
If RichmondTraffic is the only one giving you issues, than you can
change this:
  RichmondTraffic = new google.maps.KmlLayer('
http://map.richmondgov.com/Bing/Traffic/georssfeed.ashx');

to this:
  RichmondTraffic = new google.maps.KmlLayer('
http://map.richmondgov.com/Bing/Traffic/georssfeed.ashx',{preserveViewport:true});

(you might consider adding ",{preserveViewport:true}" to all the
KmlLayer calls as that will maintain the viewport when all the layers
are added removed - this isn't an issue now but could be in the future
depending on if the feed content changes)

On May 10, 6:51 pm, Jason Sanford  wrote:
> I copy and pasted your code and made some changes to it. I'm still having
> issues with your traffic layer acting weird when toggling it but the other
> two layers toggle fine.
>
> http://test.geojason.info/viper.html
>
> You can see the code there and compare to yours.
>
> On Mon, May 10, 2010 at 8:45 PM, Jack Berberette  wrote:
> > Thanks for taking your time in this Brad :)  I have implemented the changes
> > but I must something wrong because the map area is just grey now.  Here's
> > the link to the page:http://www.gamecarver.com/viperapp3.html
>
> > Here's the link to a page that has the maps on:
> >http://www.gamecarver.com/viperapp2.html(this was my first attempt)
>
> > Here's the code after the changesI'm really sorry to be a burden:
>
> > 
> > 
> > 
> > 
> > VIPER Traffic and Hazmat LIVE
> > http://maps.google.com/maps/api/js?sensor=true";>
> > 
> > var initialLocation;
> > var statepolice = new google.maps.LatLng(37.502168, -77.542212);
> > var Hazmat;
> > var RichmondTraffic;
> > var StateShelters;
> > var trafficLayer;
> > var map;
>
> > function toggleLayer(layer) {
> >    if (layer.getMap()) {
> >      layer.setMap(null);
> >    } else {
> >      layer.setMap(map);
> >    }
> >  }
>
> > function initialize() {
> >   var myOptions = {
> >     zoom: 14,
> >     mapTypeId: google.maps.MapTypeId.ROADMAP
> >   };
> >   var map = new google.maps.Map(document.getElementById("map_canvas"),
> > myOptions);
> >   var map = new google.maps.KmlLayer('
> >https://cop.vdem.virginia.gov/gis_feeds/GeoRSS2.ashx'<https://cop.vdem.virginia.gov/gis_feeds/GeoRSS2.ashx%27>
> > );
> >   Hazmat.setMap(map);
> >   var map = new google.maps.KmlLayer('
> >http://map.richmondgov.com/Bing/Traffic/georssfeed.ashx'<http://map.richmondgov.com/Bing/Traffic/georssfeed.ashx%27>
> > );
> >   RichmondTraffic.setMap(map);
> >   var map = new google.maps.KmlLayer('
> >https://cop.vdem.virginia.gov/gis_feeds/ShelterGeoRSS.ashx'<https://cop.vdem.virginia.gov/gis_feeds/ShelterGeoRSS.ashx%27>
> > );
> >   StateShelters.setMap(map);
> >   var map = new google.maps.TrafficLayer();
> >   trafficLayer.setMap(map);
>
> >   // Safari supports the W3C Geolocation method
> >   if(navigator.geolocation) {
> >     navigator.geolocation.getCurrentPosition(function(position) {
> >       initialLocation = new
> > google.maps.LatLng(position.coords.latitude,position.coords.longitude);
> >       var placeMarker = new google.maps.Marker({
> >         position: initialLocation,
> >         map: map,
> >       });
> >       map.setCenter(initialLocation);
> >     }, function() {
> >       handleNoGeolocation(browserSupportFlag);
> >     });
> >   } else {
> >     // Browser doesn't support Geolocation
> >     handleNoGeolocation();
> >   }
>
> >   function handleNoGeolocation() {
> >     initialLocation = statepolice;
> >     map.setCenter(initialLocation);
> >   }
>
> > }
>
> > 
> > 
> > DIV.container {
> >     width: 100%;
> >     height: 50px;
> > align: center;
> > background-image: url(
> >http://www.gamecarver.com/img/appimages/DivHeaderBG2.png);
> >  // display: table-cell;
> > vertical-align: middle;
> >     font-size:medium;
> >  font-family: sans-serif;
> > color: white;
> > text-align: center;
> >  font-weight: bold;
> > }
> > 
> > 
> > 
> >   
> >   http://www.gamecarver.com/img/appimages/Header1.png";
> >   
> >   http://www.gamecarver.com/img/appimages/DivHeaderBG2.png);height: 25px;
> > width: 100%">
> >    Traffic
> > Incodents 
> >  Hazmat 
> >  Google Traffic 
> > 
> >   
> > 
> > 
>
> > On Mon, May 10, 2010 at 8:31 PM, Brad  wrote:
>
> >> #1) Remove the function toggleLayer definition that you have inside of
> >> initialize function, you only need it defined once, outside of the
> >> init function.
> >> #2)remove ref

[Google Maps API v3] There is no GDraggableObject; mouse events.

2010-05-10 Thread Valeh
Hi,
Since there is not GDraggableObject, how can I access mouse down and
mouse up events on the map?

Thanks,
Valeh

-- 
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-maps-js-api...@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.



Re: [Google Maps API v3]

2010-05-10 Thread Jason Sanford
I copy and pasted your code and made some changes to it. I'm still having
issues with your traffic layer acting weird when toggling it but the other
two layers toggle fine.

http://test.geojason.info/viper.html

You can see the code there and compare to yours.

On Mon, May 10, 2010 at 8:45 PM, Jack Berberette  wrote:

> Thanks for taking your time in this Brad :)  I have implemented the changes
> but I must something wrong because the map area is just grey now.  Here's
> the link to the page: http://www.gamecarver.com/viperapp3.html
>
> Here's the link to a page that has the maps on:
> http://www.gamecarver.com/viperapp2.html (this was my first attempt)
>
> Here's the code after the changesI'm really sorry to be a burden:
>
> 
> 
> 
> 
> VIPER Traffic and Hazmat LIVE
> http://maps.google.com/maps/api/js?sensor=true";>
> 
> var initialLocation;
> var statepolice = new google.maps.LatLng(37.502168, -77.542212);
> var Hazmat;
> var RichmondTraffic;
> var StateShelters;
> var trafficLayer;
> var map;
>
> function toggleLayer(layer) {
>if (layer.getMap()) {
>  layer.setMap(null);
>} else {
>  layer.setMap(map);
>}
>  }
>
>
> function initialize() {
>   var myOptions = {
> zoom: 14,
> mapTypeId: google.maps.MapTypeId.ROADMAP
>   };
>   var map = new google.maps.Map(document.getElementById("map_canvas"),
> myOptions);
>   var map = new google.maps.KmlLayer('
> https://cop.vdem.virginia.gov/gis_feeds/GeoRSS2.ashx'<https://cop.vdem.virginia.gov/gis_feeds/GeoRSS2.ashx%27>
> );
>   Hazmat.setMap(map);
>   var map = new google.maps.KmlLayer('
> http://map.richmondgov.com/Bing/Traffic/georssfeed.ashx'<http://map.richmondgov.com/Bing/Traffic/georssfeed.ashx%27>
> );
>   RichmondTraffic.setMap(map);
>   var map = new google.maps.KmlLayer('
> https://cop.vdem.virginia.gov/gis_feeds/ShelterGeoRSS.ashx'<https://cop.vdem.virginia.gov/gis_feeds/ShelterGeoRSS.ashx%27>
> );
>   StateShelters.setMap(map);
>   var map = new google.maps.TrafficLayer();
>   trafficLayer.setMap(map);
>
>   // Safari supports the W3C Geolocation method
>   if(navigator.geolocation) {
> navigator.geolocation.getCurrentPosition(function(position) {
>   initialLocation = new
> google.maps.LatLng(position.coords.latitude,position.coords.longitude);
>   var placeMarker = new google.maps.Marker({
> position: initialLocation,
> map: map,
>   });
>   map.setCenter(initialLocation);
> }, function() {
>   handleNoGeolocation(browserSupportFlag);
> });
>   } else {
> // Browser doesn't support Geolocation
> handleNoGeolocation();
>   }
>
>   function handleNoGeolocation() {
> initialLocation = statepolice;
> map.setCenter(initialLocation);
>   }
>
> }
>
>
>
>
>
> 
> 
> DIV.container {
> width: 100%;
> height: 50px;
> align: center;
> background-image: url(
> http://www.gamecarver.com/img/appimages/DivHeaderBG2.png);
>  // display: table-cell;
> vertical-align: middle;
> font-size:medium;
>  font-family: sans-serif;
> color: white;
> text-align: center;
>  font-weight: bold;
> }
> 
> 
> 
>   
>   http://www.gamecarver.com/img/appimages/Header1.png";
>   
>   http://www.gamecarver.com/img/appimages/DivHeaderBG2.png); height: 25px;
> width: 100%">
>Traffic
> Incodents 
>  Hazmat 
>  Google Traffic 
> 
>   
> 
> 
>
> On Mon, May 10, 2010 at 8:31 PM, Brad  wrote:
>
>> #1) Remove the function toggleLayer definition that you have inside of
>> initialize function, you only need it defined once, outside of the
>> init function.
>> #2)remove references to "var" inside of the init function.  Even
>> though you did the right thing by defining those variables outside of
>> the function, when you put "var" in the function again, it is
>> redefining a locally scoped variable with the same name.  By removing
>> "var" inside of the init function on variables that were already
>> defined, you are keeping them in "global" scope.
>> #3)Add "var map;" to where you are initting the other variables, you
>> will need the map in global scope in order for the toggleLayer
>> function to work correctly.
>>
>>
>>
>>
>> On May 10, 6:16 pm, Jack Berberette  wrote:
>> > Thanks for the response Jason,
>> >
>> > I just gave it a try but the toggle doesn't work.  Her's the code did I
>> mess
>> > up setting the variables?  Also I'm not sure if I set the toggleLayer
>> code
>> > in 

Re: [Google Maps API v3]

2010-05-10 Thread Jack Berberette
Now that's an Eagle Eye!   Thanks William...that took care of it.

I have one really weird thing happening

When I click on the "Traffic Accidents" button (called from
(RichmondTraffic)...the zoom eventually zooms all the way out or all they
way in.  The other buttons work just fine.  Any ideas?

Jack



On Mon, May 10, 2010 at 9:51 PM, William  wrote:

> On May 11, 11:26 am, Jack Berberette  wrote:
> >  initialLocation =
> >
> newgoogle.maps.LatLng(position.coords.latitude,position.coords.longitude);
> >
> there should be a space between new and google.maps.LatLng
>
> ...
>
> --
> 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-maps-js-api...@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.
>
>

-- 
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-maps-js-api...@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.



[Google Maps API v3] Re: Custom Map Type with background color

2010-05-10 Thread William
On May 10, 9:45 pm, "@neavilag (Norman)"  wrote:
> Thanks William, fits really good, to use realtime data will have to
> keep it with all the image... what tool you used to get the bounds ?
>
the image had graticule lines on it, so I just used photoshop to clip
it to (5,-95) (20,-75)

...

-- 
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-maps-js-api...@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.



Re: [Google Maps API v3]

2010-05-10 Thread William
On May 11, 11:26 am, Jack Berberette  wrote:
>      initialLocation =
> newgoogle.maps.LatLng(position.coords.latitude,position.coords.longitude);
>
there should be a space between new and google.maps.LatLng

...

-- 
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-maps-js-api...@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.



Re: [Google Maps API v3]

2010-05-10 Thread Jack Berberette
Awesome Brad...this is s helpful :)  Everything seems to be working
except my initial location placemarker doesn't show for some reason.  Not
sure why...I'll paste the code below.

I work for The Dept. of Emergency Management here in Virginia and our goal
is to help our first responders by providing some "boots on the ground" type
tools.  Anything we can do to help them can potentially save a life.  I'm a
MCSE by trade but I guess my boss thought I was best suited to give this a
whirl :)  Once my team learns how to do this we'll start adding better
features to the map to help those guys out even further.  So trust me when I
say...there's a lot of people who'll appreciate your helping me with this :)

Anyway... Here's the code...not sure why the initial location marker doesn't
show.  The rest is FREAKING AWESOME! (
http://www.gamecarver.com/viperapp6.html)  - Jack





VIPER Traffic and Hazmat LIVE
http://maps.google.com/maps/api/js?sensor=true";>

var initialLocation;
var statepolice = new google.maps.LatLng(37.502168, -77.542212);
var Hazmat;
var RichmondTraffic;
var StateShelters;
var trafficLayer;
var map;

function initialize() {
 var myOptions = {
   zoom: 14,
   mapTypeId: google.maps.MapTypeId.ROADMAP
 };
 //Notice no "var" before variable assignment, that is taken care of above.
 map = new google.maps.Map(document.getElementById("map_canvas"),myOptions);
 Hazmat = new google.maps.KmlLayer('
https://cop.vdem.virginia.gov/gis_feeds/GeoRSS2.ashx');
 RichmondTraffic = new google.maps.KmlLayer('
http://map.richmondgov.com/Bing/Traffic/georssfeed.ashx');
 StateShelters = new google.maps.KmlLayer('
https://cop.vdem.virginia.gov/gis_feeds/ShelterGeoRSS.ashx');
 trafficLayer = new google.maps.TrafficLayer();

 //Just to demonstrate the use of toggleLayer
 toggleLayer(Hazmat);
 toggleLayer(RichmondTraffic);
 toggleLayer(StateShelters);
 toggleLayer(trafficLayer);

 // Safari supports the W3C Geolocation method
 if(navigator.geolocation) {
   navigator.geolocation.getCurrentPosition(function(position) {
 initialLocation =
newgoogle.maps.LatLng(position.coords.latitude,position.coords.longitude);
 var placeMarker = new google.maps.Marker({
   position: initialLocation,
   map: map,
 });
 map.setCenter(initialLocation);
   }, function() {
 handleNoGeolocation(browserSupportFlag);
   });
 } else {
   // Browser doesn't support Geolocation
   handleNoGeolocation();
 }

function handleNoGeolocation() {
   initialLocation = statepolice;
   map.setCenter(initialLocation);
}
}

function toggleLayer(layer) {
   if (layer.getMap()) {
   layer.setMap(null);
   } else {
   layer.setMap(map);
   }
}



DIV.container {
width: 100%;
height: 50px;
align: center;
background-image: url(
http://www.gamecarver.com/img/appimages/DivHeaderBG2.png);
// display: table-cell;
vertical-align: middle;
font-size:medium;
font-family: sans-serif;
color: white;
text-align: center;
font-weight: bold;
}



  
  http://www.gamecarver.com/img/appimages/Header1.png";

  
  http://www.gamecarver.com/img/appimages/DivHeaderBG2.png); height: 25px;
width: 100%">
   Traffic Incodents

 Hazmat 
 Google Traffic 
 State Shelters 

  






On Mon, May 10, 2010 at 8:55 PM, Brad  wrote:

> No problem Jack - I definitely understand what it's like getting into
> it.   Try this code and review the changes i made:
>
> 
> 
> 
> 
> VIPER Traffic and Hazmat LIVE
> http://maps.google.com/maps/api/js?sensor=true";>
> 
> var initialLocation;
> var statepolice = new google.maps.LatLng(37.502168, -77.542212);
> var Hazmat;
> var RichmondTraffic;
> var StateShelters;
> var trafficLayer;
> var map;
>
> function initialize() {
>  var myOptions = {
>zoom: 14,
>mapTypeId: google.maps.MapTypeId.ROADMAP
>  };
>   //Notice no "var" before variable assignment, that is taken care of
> above.
>   map = new google.maps.Map(document.getElementById("map_canvas"),
> myOptions);
>   Hazmat = new google.maps.KmlLayer('
> https://cop.vdem.virginia.gov/gis_feeds/GeoRSS2.ashx');
>   RichmondTraffic = new google.maps.KmlLayer('
> http://map.richmondgov.com/Bing/Traffic/georssfeed.ashx');
>   StateShelters = new google.maps.KmlLayer('
> https://cop.vdem.virginia.gov/gis_feeds/ShelterGeoRSS.ashx');
>   trafficLayer = new google.maps.TrafficLayer();
>
>   //Just to demonstrate the use of toggl

Re: [Google Maps API v3]

2010-05-10 Thread Brad
looks like google pushed my "//Notice no "var" before variable
assignment, that is taken care of above." comment into two lines,
thusly breaking the JS - please either remove or make this one line
again and that should work.  ;)

On May 10, 6:55 pm, Brad  wrote:
> No problem Jack - I definitely understand what it's like getting into
> it.   Try this code and review the changes i made:
>
> 
> 
> 
> 
> VIPER Traffic and Hazmat LIVE
>  src="http://maps.google.com/maps/api/js?sensor=true";>
> 
> var initialLocation;
> var statepolice = new google.maps.LatLng(37.502168, -77.542212);
> var Hazmat;
> var RichmondTraffic;
> var StateShelters;
> var trafficLayer;
> var map;
>
> function initialize() {
>   var myOptions = {
>     zoom: 14,
>     mapTypeId: google.maps.MapTypeId.ROADMAP
>   };
>   //Notice no "var" before variable assignment, that is taken care of
> above.
>   map = new google.maps.Map(document.getElementById("map_canvas"),
> myOptions);
>   Hazmat = new 
> google.maps.KmlLayer('https://cop.vdem.virginia.gov/gis_feeds/GeoRSS2.ashx');
>   RichmondTraffic = new 
> google.maps.KmlLayer('http://map.richmondgov.com/Bing/Traffic/georssfeed.ashx');
>   StateShelters = new 
> google.maps.KmlLayer('https://cop.vdem.virginia.gov/gis_feeds/ShelterGeoRSS.ashx');
>   trafficLayer = new google.maps.TrafficLayer();
>
>   //Just to demonstrate the use of toggleLayer
>   toggleLayer(Hazmat);
>   toggleLayer(RichmondTraffic);
>   toggleLayer(StateShelters);
>   toggleLayer(trafficLayer);
>
>   // Safari supports the W3C Geolocation method
>   if(navigator.geolocation) {
>     navigator.geolocation.getCurrentPosition(function(position) {
>       initialLocation = new
> google.maps.LatLng(position.coords.latitude,position.coords.longitude);
>       var placeMarker = new google.maps.Marker({
>         position: initialLocation,
>         map: map,
>       });
>       map.setCenter(initialLocation);
>     }, function() {
>       handleNoGeolocation(browserSupportFlag);
>     });
>   } else {
>     // Browser doesn't support Geolocation
>     handleNoGeolocation();
>   }
>
> }
>
> function handleNoGeolocation() {
>         initialLocation = statepolice;
>         map.setCenter(initialLocation);
>
> }
>
> function toggleLayer(layer) {
>         if (layer.getMap()) {
>                 layer.setMap(null);
>         } else {
>                 layer.setMap(map);
>         }
>
> }
>
> 
> 
> DIV.container {
>     width: 100%;
>     height: 50px;
> align: center;
> background-image: 
> url(http://www.gamecarver.com/img/appimages/DivHeaderBG2.png);
> // display: table-cell;
> vertical-align: middle;
>     font-size:medium;
> font-family: sans-serif;
> color: white;
> text-align: center;
> font-weight: bold;
>
> }
>
> 
> 
> 
>   
>    src="http://www.gamecarver.com/img/appimages/Header1.png";
>   
>   http://www.gamecarver.com/img/appimages/DivHeaderBG2.png);height:
> 25px;
> width: 100%">
>    Traffic Incodents
> 
>  Hazmat 
>  Google Traffic 
> 
>   
> 
> 
>
> On May 10, 6:45 pm, Jack Berberette  wrote:
>
> > Thanks for taking your time in this Brad :)  I have implemented the changes
> > but I must something wrong because the map area is just grey now.  Here's
> > the link to the page:http://www.gamecarver.com/viperapp3.html
>
> > Here's the link to a page that has the maps 
> > on:http://www.gamecarver.com/viperapp2.html(thiswas my first attempt)
>
> > Here's the code after the changesI'm really sorry to be a burden:
>
> > 
> > 
> > 
> > 
> > VIPER Traffic and Hazmat LIVE
> >  > src="http://maps.google.com/maps/api/js?sensor=true";>
> > 
> > var initialLocation;
> > var statepolice = new google.maps.LatLng(37.502168, -77.542212);
> > var Hazmat;
> > var RichmondTraffic;
> > var StateShelters;
> > var trafficLayer;
> > var map;
>
> > function toggleLayer(layer) {
> >    if (layer.getMap()) {
> >      layer.setMap(null);
> >    } else {
> >      layer.setMap(map);
> >    }
> >  }
>
> > function initialize() {
> >   var myOptions = {
> >     zoom: 14,
> >     mapTypeId: google.maps.MapTypeId.ROADMAP
> >   };
> >   var map = new google.maps.Map(document.getElementById("map_canvas"),
> > myOptions);
> >   var map = new 
> > google.maps.KmlLayer('https://cop.vdem.virginia.gov/gis_feeds/GeoRSS2.ashx');
> >   Hazmat.setMap(map);
> >   var map = new 
> > google.maps.KmlLayer('http:

Re: [Google Maps API v3]

2010-05-10 Thread Brad
No problem Jack - I definitely understand what it's like getting into
it.   Try this code and review the changes i made:





VIPER Traffic and Hazmat LIVE
http://maps.google.com/maps/api/js?sensor=true";>

var initialLocation;
var statepolice = new google.maps.LatLng(37.502168, -77.542212);
var Hazmat;
var RichmondTraffic;
var StateShelters;
var trafficLayer;
var map;

function initialize() {
  var myOptions = {
zoom: 14,
mapTypeId: google.maps.MapTypeId.ROADMAP
  };
  //Notice no "var" before variable assignment, that is taken care of
above.
  map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
  Hazmat = new google.maps.KmlLayer('
https://cop.vdem.virginia.gov/gis_feeds/GeoRSS2.ashx');
  RichmondTraffic = new google.maps.KmlLayer('
http://map.richmondgov.com/Bing/Traffic/georssfeed.ashx');
  StateShelters = new google.maps.KmlLayer('
https://cop.vdem.virginia.gov/gis_feeds/ShelterGeoRSS.ashx');
  trafficLayer = new google.maps.TrafficLayer();

  //Just to demonstrate the use of toggleLayer
  toggleLayer(Hazmat);
  toggleLayer(RichmondTraffic);
  toggleLayer(StateShelters);
  toggleLayer(trafficLayer);

  // Safari supports the W3C Geolocation method
  if(navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
  initialLocation = new
google.maps.LatLng(position.coords.latitude,position.coords.longitude);
  var placeMarker = new google.maps.Marker({
position: initialLocation,
map: map,
  });
  map.setCenter(initialLocation);
}, function() {
  handleNoGeolocation(browserSupportFlag);
});
  } else {
// Browser doesn't support Geolocation
handleNoGeolocation();
  }

}

function handleNoGeolocation() {
initialLocation = statepolice;
map.setCenter(initialLocation);
}

function toggleLayer(layer) {
if (layer.getMap()) {
layer.setMap(null);
} else {
layer.setMap(map);
}
}



DIV.container {
width: 100%;
height: 50px;
align: center;
background-image: url(
http://www.gamecarver.com/img/appimages/DivHeaderBG2.png);
// display: table-cell;
vertical-align: middle;
font-size:medium;
font-family: sans-serif;
color: white;
text-align: center;
font-weight: bold;
}




  
  http://www.gamecarver.com/img/appimages/Header1.png";
  
  http://www.gamecarver.com/img/appimages/DivHeaderBG2.png); height:
25px;
width: 100%">
   Traffic Incodents

 Hazmat 
 Google Traffic 

  



On May 10, 6:45 pm, Jack Berberette  wrote:
> Thanks for taking your time in this Brad :)  I have implemented the changes
> but I must something wrong because the map area is just grey now.  Here's
> the link to the page:http://www.gamecarver.com/viperapp3.html
>
> Here's the link to a page that has the maps 
> on:http://www.gamecarver.com/viperapp2.html(this was my first attempt)
>
> Here's the code after the changesI'm really sorry to be a burden:
>
> 
> 
> 
> 
> VIPER Traffic and Hazmat LIVE
>  src="http://maps.google.com/maps/api/js?sensor=true";>
> 
> var initialLocation;
> var statepolice = new google.maps.LatLng(37.502168, -77.542212);
> var Hazmat;
> var RichmondTraffic;
> var StateShelters;
> var trafficLayer;
> var map;
>
> function toggleLayer(layer) {
>    if (layer.getMap()) {
>      layer.setMap(null);
>    } else {
>      layer.setMap(map);
>    }
>  }
>
> function initialize() {
>   var myOptions = {
>     zoom: 14,
>     mapTypeId: google.maps.MapTypeId.ROADMAP
>   };
>   var map = new google.maps.Map(document.getElementById("map_canvas"),
> myOptions);
>   var map = new 
> google.maps.KmlLayer('https://cop.vdem.virginia.gov/gis_feeds/GeoRSS2.ashx');
>   Hazmat.setMap(map);
>   var map = new 
> google.maps.KmlLayer('http://map.richmondgov.com/Bing/Traffic/georssfeed.ashx');
>   RichmondTraffic.setMap(map);
>   var map = new 
> google.maps.KmlLayer('https://cop.vdem.virginia.gov/gis_feeds/ShelterGeoRSS.ashx');
>   StateShelters.setMap(map);
>   var map = new google.maps.TrafficLayer();
>   trafficLayer.setMap(map);
>
>   // Safari supports the W3C Geolocation method
>   if(navigator.geolocation) {
>     navigator.geolocation.getCurrentPosition(function(position) {
>       initialLocation = new
> google.maps.LatLng(position.coords.latitude,position.coords.longitude

Re: [Google Maps API v3]

2010-05-10 Thread Jack Berberette
Thanks for taking your time in this Brad :)  I have implemented the changes
but I must something wrong because the map area is just grey now.  Here's
the link to the page: http://www.gamecarver.com/viperapp3.html

Here's the link to a page that has the maps on:
http://www.gamecarver.com/viperapp2.html (this was my first attempt)

Here's the code after the changesI'm really sorry to be a burden:





VIPER Traffic and Hazmat LIVE
http://maps.google.com/maps/api/js?sensor=true";>

var initialLocation;
var statepolice = new google.maps.LatLng(37.502168, -77.542212);
var Hazmat;
var RichmondTraffic;
var StateShelters;
var trafficLayer;
var map;

function toggleLayer(layer) {
   if (layer.getMap()) {
 layer.setMap(null);
   } else {
 layer.setMap(map);
   }
 }


function initialize() {
  var myOptions = {
zoom: 14,
mapTypeId: google.maps.MapTypeId.ROADMAP
  };
  var map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
  var map = new google.maps.KmlLayer('
https://cop.vdem.virginia.gov/gis_feeds/GeoRSS2.ashx');
  Hazmat.setMap(map);
  var map = new google.maps.KmlLayer('
http://map.richmondgov.com/Bing/Traffic/georssfeed.ashx');
  RichmondTraffic.setMap(map);
  var map = new google.maps.KmlLayer('
https://cop.vdem.virginia.gov/gis_feeds/ShelterGeoRSS.ashx');
  StateShelters.setMap(map);
  var map = new google.maps.TrafficLayer();
  trafficLayer.setMap(map);

  // Safari supports the W3C Geolocation method
  if(navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
  initialLocation = new
google.maps.LatLng(position.coords.latitude,position.coords.longitude);
  var placeMarker = new google.maps.Marker({
position: initialLocation,
map: map,
  });
  map.setCenter(initialLocation);
}, function() {
  handleNoGeolocation(browserSupportFlag);
});
  } else {
// Browser doesn't support Geolocation
handleNoGeolocation();
  }

  function handleNoGeolocation() {
initialLocation = statepolice;
map.setCenter(initialLocation);
  }

}







DIV.container {
width: 100%;
height: 50px;
align: center;
background-image: url(
http://www.gamecarver.com/img/appimages/DivHeaderBG2.png);
// display: table-cell;
vertical-align: middle;
font-size:medium;
font-family: sans-serif;
color: white;
text-align: center;
font-weight: bold;
}



  
  http://www.gamecarver.com/img/appimages/Header1.png";
  
  http://www.gamecarver.com/img/appimages/DivHeaderBG2.png); height: 25px;
width: 100%">
   Traffic
Incodents 
 Hazmat 
 Google Traffic 

  



On Mon, May 10, 2010 at 8:31 PM, Brad  wrote:

> #1) Remove the function toggleLayer definition that you have inside of
> initialize function, you only need it defined once, outside of the
> init function.
> #2)remove references to "var" inside of the init function.  Even
> though you did the right thing by defining those variables outside of
> the function, when you put "var" in the function again, it is
> redefining a locally scoped variable with the same name.  By removing
> "var" inside of the init function on variables that were already
> defined, you are keeping them in "global" scope.
> #3)Add "var map;" to where you are initting the other variables, you
> will need the map in global scope in order for the toggleLayer
> function to work correctly.
>
>
>
>
> On May 10, 6:16 pm, Jack Berberette  wrote:
> > Thanks for the response Jason,
> >
> > I just gave it a try but the toggle doesn't work.  Her's the code did I
> mess
> > up setting the variables?  Also I'm not sure if I set the toggleLayer
> code
> > in the right spot:
> >
> > function toggleLayer(layer) {
> >if (layer.getMap()) {
> >  layer.setMap(null);
> >} else {
> >  layer.setMap(map);
> >}
> >  }
> >
> > Here's the code for the page:
> >
> > 
> > 
> > 
> > 
> > VIPER Traffic and Hazmat LIVE
> > http://maps.google.com/maps/api/js?sensor=true";>
> > 
> > var initialLocation;
> > var statepolice = new google.maps.LatLng(37.502168, -77.542212);
> > var Hazmat;
> > var RichmondTraffic;
> > var StateShelters;
> > var trafficLayer;
> >
> > function initialize() {
> >   var myOptions = {
> > zoom: 14,
> > mapTypeId: google.maps.MapTypeId.ROADMAP
> >   };
> >   var map = new google.maps.Map(document.getElementById("map_canvas"),
> > myOptions);
> >   var Hazmat = new google.maps.KmlLayer('
> https://cop.vdem.virginia.gov/gis_feeds/GeoRSS2.ashx');
> >   Hazmat.setMap(map);
> >   var RichmondTraffic = new google.maps.KmlLayer('
> Re: [Google Maps API v3]

#1) Remove the function toggleLayer definition that you have inside of
initialize function, you only need it defined once, outside of the
init function.
#2)remove references to "var" inside of the init function.  Even
though you did the right thing by defining those variables outside of
the function, when you put "var" in the function again, it is
redefining a locally scoped variable with the same name.  By removing
"var" inside of the init function on variables that were already
defined, you are keeping them in "global" scope.
#3)Add "var map;" to where you are initting the other variables, you
will need the map in global scope in order for the toggleLayer
function to work correctly.




On May 10, 6:16 pm, Jack Berberette  wrote:
> Thanks for the response Jason,
>
> I just gave it a try but the toggle doesn't work.  Her's the code did I mess
> up setting the variables?  Also I'm not sure if I set the toggleLayer code
> in the right spot:
>
> function toggleLayer(layer) {
>    if (layer.getMap()) {
>      layer.setMap(null);
>    } else {
>      layer.setMap(map);
>    }
>  }
>
> Here's the code for the page:
>
> 
> 
> 
> 
> VIPER Traffic and Hazmat LIVE
>  src="http://maps.google.com/maps/api/js?sensor=true";>
> 
> var initialLocation;
> var statepolice = new google.maps.LatLng(37.502168, -77.542212);
> var Hazmat;
> var RichmondTraffic;
> var StateShelters;
> var trafficLayer;
>
> function initialize() {
>   var myOptions = {
>     zoom: 14,
>     mapTypeId: google.maps.MapTypeId.ROADMAP
>   };
>   var map = new google.maps.Map(document.getElementById("map_canvas"),
> myOptions);
>   var Hazmat = new 
> google.maps.KmlLayer('https://cop.vdem.virginia.gov/gis_feeds/GeoRSS2.ashx');
>   Hazmat.setMap(map);
>   var RichmondTraffic = new 
> google.maps.KmlLayer('http://map.richmondgov.com/Bing/Traffic/georssfeed.ashx');
>   RichmondTraffic.setMap(map);
>   var StateShelters = new 
> google.maps.KmlLayer('https://cop.vdem.virginia.gov/gis_feeds/ShelterGeoRSS.ashx');
>   StateShelters.setMap(map);
>   var trafficLayer = new google.maps.TrafficLayer();
>   trafficLayer.setMap(map);
>
>   // Safari supports the W3C Geolocation method
>   if(navigator.geolocation) {
>     navigator.geolocation.getCurrentPosition(function(position) {
>       initialLocation = new
> google.maps.LatLng(position.coords.latitude,position.coords.longitude);
>       var placeMarker = new google.maps.Marker({
>         position: initialLocation,
>         map: map,
>       });
>       map.setCenter(initialLocation);
>     }, function() {
>       handleNoGeolocation(browserSupportFlag);
>     });
>   } else {
>     // Browser doesn't support Geolocation
>     handleNoGeolocation();
>   }
>
>   function handleNoGeolocation() {
>     initialLocation = statepolice;
>     map.setCenter(initialLocation);
>   }
>
>   function toggleLayer(layer) {
>    if (layer.getMap()) {
>      layer.setMap(null);
>    } else {
>      layer.setMap(map);
>    }
>  }
>
> }
>
>   function toggleLayer(layer) {
>    if (layer.getMap()) {
>      layer.setMap(null);
>    } else {
>      layer.setMap(map);
>    }
>  }
>
> 
> 
> DIV.container {
>     width: 100%;
>     height: 50px;
> align: center;
> background-image: 
> url(http://www.gamecarver.com/img/appimages/DivHeaderBG2.png);
> // display: table-cell;
> vertical-align: middle;
>     font-size:medium;
> font-family: sans-serif;
> color: white;
> text-align: center;
> font-weight: bold;}
>
> 
> 
> 
>   
>    src="http://www.gamecarver.com/img/appimages/Header1.png";
>   
>   http://www.gamecarver.com/img/appimages/DivHeaderBG2.png);height: 25px;
> width: 100%">
>    Traffic Incodents
> 
>  Hazmat 
>  Google Traffic 
> 
>   
> 
> 
>
> On Mon, May 10, 2010 at 8:04 PM, Jason Sanford wrote:
>
>
>
> > Declare richmondTraffic (and any other KmlLayer) outside of any functions
> > like where you declare initialLocation, statepolice, etc.
>
> > On Mon, May 10, 2010 at 7:06 PM, Jack Berberette wrote:
>
> >> Thanks ESA for the quick response.  The function looks simple enoug but
> >> how do I set a variable in global scope...ie RichmondTraffic...based on the
> >> code I have?   Sorry to be such a newb...but I don't want to break what I
> >> have...lol
>
> >> I can't thank you enough for helping me out,
>
> >> Jack
>
> >> Sent from my iPhone
>
> >> On May 10, 2010, at 6:25 PM, Esa  wrote:
>
> >>  Construct a toggle function in global scope
>
> >>> function toggleLayer(layer) {
> >>>   if (layer.getMap()) {
> >>>     layer.setMap(null);
> >>>   } else {
> >>>     layer.setMap(map);
> >>>   }
> >>>  }
>
> >>> T

Re: [Google Maps API v3]

Thanks for the response Jason,

I just gave it a try but the toggle doesn't work.  Her's the code did I mess
up setting the variables?  Also I'm not sure if I set the toggleLayer code
in the right spot:

function toggleLayer(layer) {
   if (layer.getMap()) {
 layer.setMap(null);
   } else {
 layer.setMap(map);
   }
 }

Here's the code for the page:





VIPER Traffic and Hazmat LIVE
http://maps.google.com/maps/api/js?sensor=true";>

var initialLocation;
var statepolice = new google.maps.LatLng(37.502168, -77.542212);
var Hazmat;
var RichmondTraffic;
var StateShelters;
var trafficLayer;

function initialize() {
  var myOptions = {
zoom: 14,
mapTypeId: google.maps.MapTypeId.ROADMAP
  };
  var map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
  var Hazmat = new google.maps.KmlLayer('
https://cop.vdem.virginia.gov/gis_feeds/GeoRSS2.ashx');
  Hazmat.setMap(map);
  var RichmondTraffic = new google.maps.KmlLayer('
http://map.richmondgov.com/Bing/Traffic/georssfeed.ashx');
  RichmondTraffic.setMap(map);
  var StateShelters = new google.maps.KmlLayer('
https://cop.vdem.virginia.gov/gis_feeds/ShelterGeoRSS.ashx');
  StateShelters.setMap(map);
  var trafficLayer = new google.maps.TrafficLayer();
  trafficLayer.setMap(map);

  // Safari supports the W3C Geolocation method
  if(navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
  initialLocation = new
google.maps.LatLng(position.coords.latitude,position.coords.longitude);
  var placeMarker = new google.maps.Marker({
position: initialLocation,
map: map,
  });
  map.setCenter(initialLocation);
}, function() {
  handleNoGeolocation(browserSupportFlag);
});
  } else {
// Browser doesn't support Geolocation
handleNoGeolocation();
  }

  function handleNoGeolocation() {
initialLocation = statepolice;
map.setCenter(initialLocation);
  }

  function toggleLayer(layer) {
   if (layer.getMap()) {
 layer.setMap(null);
   } else {
 layer.setMap(map);
   }
 }


}

  function toggleLayer(layer) {
   if (layer.getMap()) {
 layer.setMap(null);
   } else {
 layer.setMap(map);
   }
 }



DIV.container {
width: 100%;
height: 50px;
align: center;
background-image: url(
http://www.gamecarver.com/img/appimages/DivHeaderBG2.png);
// display: table-cell;
vertical-align: middle;
font-size:medium;
font-family: sans-serif;
color: white;
text-align: center;
font-weight: bold;
}



  
  http://www.gamecarver.com/img/appimages/Header1.png";
  
  http://www.gamecarver.com/img/appimages/DivHeaderBG2.png); height: 25px;
width: 100%">
   Traffic Incodents

 Hazmat 
 Google Traffic 

  



On Mon, May 10, 2010 at 8:04 PM, Jason Sanford wrote:

> Declare richmondTraffic (and any other KmlLayer) outside of any functions
> like where you declare initialLocation, statepolice, etc.
>
>
> On Mon, May 10, 2010 at 7:06 PM, Jack Berberette wrote:
>
>> Thanks ESA for the quick response.  The function looks simple enoug but
>> how do I set a variable in global scope...ie RichmondTraffic...based on the
>> code I have?   Sorry to be such a newb...but I don't want to break what I
>> have...lol
>>
>> I can't thank you enough for helping me out,
>>
>> Jack
>>
>>
>>
>> Sent from my iPhone
>>
>>
>> On May 10, 2010, at 6:25 PM, Esa  wrote:
>>
>>  Construct a toggle function in global scope
>>>
>>> function toggleLayer(layer) {
>>>   if (layer.getMap()) {
>>> layer.setMap(null);
>>>   } else {
>>> layer.setMap(map);
>>>   }
>>>  }
>>>
>>> Then you can create buttons like:
>>>
>>>  RichmondTraffic >> button>
>>>
>>> Note that also RichmondTraffic must be a global variable when called
>>> by a html button.
>>>
>>> --
>>> 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-maps-js-api...@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.
>>>
>>>
>> --
>> 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-maps-js-api...@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.
>>
>>
>  --
> You received this message because you are 

Re: [Google Maps API v3]

Declare richmondTraffic (and any other KmlLayer) outside of any functions
like where you declare initialLocation, statepolice, etc.

On Mon, May 10, 2010 at 7:06 PM, Jack Berberette  wrote:

> Thanks ESA for the quick response.  The function looks simple enoug but how
> do I set a variable in global scope...ie RichmondTraffic...based on the code
> I have?   Sorry to be such a newb...but I don't want to break what I
> have...lol
>
> I can't thank you enough for helping me out,
>
> Jack
>
>
>
> Sent from my iPhone
>
>
> On May 10, 2010, at 6:25 PM, Esa  wrote:
>
>  Construct a toggle function in global scope
>>
>> function toggleLayer(layer) {
>>   if (layer.getMap()) {
>> layer.setMap(null);
>>   } else {
>> layer.setMap(map);
>>   }
>>  }
>>
>> Then you can create buttons like:
>>
>>  RichmondTraffic > button>
>>
>> Note that also RichmondTraffic must be a global variable when called
>> by a html button.
>>
>> --
>> 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-maps-js-api...@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.
>>
>>
> --
> 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-maps-js-api...@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.
>
>

-- 
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-maps-js-api...@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.



Re: [Google Maps API v3]

Thanks ESA for the quick response.  The function looks simple enoug  
but how do I set a variable in global scope...ie  
RichmondTraffic...based on the code I have?   Sorry to be such a  
newb...but I don't want to break what I have...lol


I can't thank you enough for helping me out,

Jack



Sent from my iPhone

On May 10, 2010, at 6:25 PM, Esa  wrote:


Construct a toggle function in global scope

function toggleLayer(layer) {
   if (layer.getMap()) {
 layer.setMap(null);
   } else {
 layer.setMap(map);
   }
 }

Then you can create buttons like:

 RichmondTraffic 

Note that also RichmondTraffic must be a global variable when called
by a html button.

--
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-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 
.




--
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-maps-js-api...@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.



[Google Maps API v3] Re: Custom Map Type with background color

There is a GroundOverlay sizer in old v2 examples
http://gmaps-samples.googlecode.com/svn/trunk/groundoverlay/groundoverlaysizer2.html

-- 
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-maps-js-api...@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.



Re: [Google Maps API v3]

Construct a toggle function in global scope

function toggleLayer(layer) {
if (layer.getMap()) {
  layer.setMap(null);
} else {
  layer.setMap(map);
}
  }

Then you can create buttons like:

 RichmondTraffic 

Note that also RichmondTraffic must be a global variable when called
by a html button.

-- 
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-maps-js-api...@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.



[Google Maps API v3] Re: Slow rendering in ie6

IE6 was dropped from the list of v3 supported browsers recently.
http://code.google.com/apis/maps/faq.html#browsersupport

-- 
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-maps-js-api...@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.



[Google Maps API v3] Re: Slow rendering in ie6

Sorry, I did not mean to post this yet. Allow me to continue.

bottlenecks is at this request:
GET /maps/api/js/AuthenticationService.Authenticate?1shttp%3A%2F%
2Fftwwdldad001.rails.rwy.bnsf.com%2Ftbn%2Fptp.nsf%2Fsbdest2&callback=_xdc_._asc7jo
HTTP/1.1

w/ response:
HTTP/1.1 200 OK
Content-Type: text/javascript; charset=UTF-8
Date: Mon, 10 May 2010 21:32:40 GMT
Server: mafe
Cache-Control: private, x-gzip-ok=""
X-XSS-Protection: 1; mode=block
Content-Length: 37
Proxy-Connection: Keep-Alive
Connection: Keep-Alive

_xdc_._asc7jo && _xdc_._asc7jo( [1] )



The next request/response happens fairly quickly:

request:
GET
/maps/api/js/ViewportInfoService.GetViewportInfo?1m6&1m2&1d-17.080755501616615&2d139.042968375&2m2&1d87.34478753824237&2d29.53124962494&2u4&3e0&4sen-US&callback=_xdc_._93tlfg
HTTP/1.1

response:
HTTP/1.1 200 OK
Content-Type: text/javascript; charset=UTF-8
Date: Mon, 10 May 2010 21:32:40 GMT
Server: mafe
Cache-Control: private, x-gzip-ok=""
X-XSS-Protection: 1; mode=block
Content-Length: 2724
Proxy-Connection: Keep-Alive
Connection: Keep-Alive

_xdc_._93tlfg && _xdc_._93tlfg( ["Map data ©2010 AND, Europa Technologies,
Geocentre Consulting, Google, INEGI, LeadDog Consulting, MapLink, Tele
Atlas",[["obliques",[[40.979898069620127,-123.74],[48.92249926375824,-112.5]]],["obliques",[[31.952162238024968,-123.74],[40.979898069620127,-112.5]]],["street_view",[[40.979898069620127,135],[48.92249926375824,146.25]]],["street_view",[[31.952162238024968,135],[40.979898069620127,146.25]]],["street_view",[[-21.943045533438177,135],[-11.178401873711781,157.5]]],["street_view",[[66.513260443111861,-157.5],[70.612614238019248,-123.74]]],["street_view",[[66.513260443111861,11.25],[70.612614238019248,33.75]]],["street_view",[[61.606396371386282,-157.5],[66.513260443111861,-112.5]]],["street_view",[[61.606396371386282,0],[66.513260443111861,33.75]]],["street_view",[[55.77657301866769,-157.5],[61.606396371386282,-90]]],["street_view",[[55.77657301866769,-11.25],[61.606396371386282,33.75]]],["street_view",[[48.92249926375824,-135],[55.77657301866769,-45]]],["street_view",[[48.92249926375824,-11.25],[55.77657301866769,22.5]]],["street_view",[[40.979898069620127,-135],[48.92249926375824,-45]]],["street_view",[[40.979898069620127,-11.25],[48.92249926375824,22.5]]],["street_view",[[31.952162238024968,-135],[40.979898069620127,-67.5]]],["street_view",[[31.952162238024968,-11.25],[40.979898069620127,22.5]]],["street_view",[[21.943045533438177,-123.74],[31.952162238024968,-78.75]]],["street_view",[[21.943045533438177,-22.5],[31.952162238024968,-11.25]]],["street_view",[[11.178401873711781,-168.75],[21.943045533438177,-146.25]]],["street_view",[[11.178401873711781,-112.5],[21.943045533438177,-78.75]]],["traffic",[[61.606396371386282,11.25],[66.513260443111861,33.75]]],["traffic",[[55.77657301866769,-11.25],[61.606396371386282,0]]],["traffic",[[55.77657301866769,11.25],[61.606396371386282,33.75]]],["traffic",[[48.92249926375824,-135],[55.77657301866769,-78.75]]],["traffic",[[48.92249926375824,-11.25],[55.77657301866769,11.25]]],["traffic",[[48.92249926375824,22.5],[55.77657301866769,33.75]]],["traffic",[[40.979898069620127,-135],[48.92249926375824,-56.25]]],["traffic",[[40.979898069620127,-11.25],[48.92249926375824,22.5]]],["traffic",[[31.952162238024968,-135],[40.979898069620127,-67.5]]],["traffic",[[31.952162238024968,11.25],[40.979898069620127,22.5]]],["traffic",[[21.943045533438177,-168.75],[31.952162238024968,-146.25]]],["traffic",[[21.943045533438177,-135],[31.952162238024968,-67.5]]],["traffic",[[11.178401873711781,-168.75],[21.943045533438177,-146.25]]],["traffic",[[11.178401873711781,-67.5],[21.943045533438177,-56.25]]],["traffic",[[-21.943045533438177,-45],[-11.178401873711781,-33.75]
)


the final request/response sometimes bottlenecks as well:

request:
GET
/csi?v=2&s=mapsapi3&action=apiboot&rt=jl.156,mjs.156,mc.21328,mb.21437,vt.22547,prt.22547,plt.1375,mt.22547&size=950x500&maptype=m
HTTP/1.1

response:
(nothing, just these headers)
HTTP/1.1 204 No Content
Date: Wed, 21 Jan 2004 19:51:30 GMT
Pragma: no-cache
Cache-Control: private, no-cache
Expires: Wed, 17 Sep 1975 21:32:10 GMT
Content-Type: text/html
Server: Golfe
Content-Length: 0
Proxy-Connection: Keep-Alive
Connection: Keep-Alive


I do not have this sandbox open to an external server yet, so i wanted to
present the question first if there is any known browser issues with these
request URLs (services) for IE6?

Thanks,
Tim

On Mon, May 10, 2010 at 4:35 PM, Saxan Sartar wrote:

> I am working on a new version of google maps app which works alongside
> extjs and jquery frameworks.
>
> The pages load very fast on firefox and ie8. However, ie6 -- it takes a
> long time. 60s-90s.
>
> Using Fiddler2, I can see most of the bottleneck is here:
>
> req
>

-- 
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

[Google Maps API v3] Slow rendering in ie6

I am working on a new version of google maps app which works alongside extjs
and jquery frameworks.

The pages load very fast on firefox and ie8. However, ie6 -- it takes a long
time. 60s-90s.

Using Fiddler2, I can see most of the bottleneck is here:

req

-- 
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-maps-js-api...@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.



Re: [Google Maps API v3] Geocoder: problem with apostrophe ?

Thanks for the bug report.  Are you using Firefox?  We found a bug in
Firefox URL escaping, we have worked around it.  The fix should go live with
the next release.

Cheers
Ben

On Mon, May 10, 2010 at 8:35 PM, rccc  wrote:

> Hello,
>
> I'm testing the geocoder ( using this one from the documentation :
>
> http://code.google.com/intl/fr/apis/maps/documentation/v3/examples/geocoding-simple.html
> ) and i noticed this :
>
> If i test with this address :
> "10 rue jeanne d'arc, orléans",   the geocoder give me an error.
>
> but if i test with the same address without apostrophe (" ' ") :
> "10 rue jeanne d arc, orléans", the geocoder woks perfectly.
>
> I wonder if i miss something :)
>
>
> riccco
>
> --
> 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-maps-js-api...@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.
>
>

-- 
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-maps-js-api...@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.



[Google Maps API v3] Toggle On/Off Buttons for KmlLayer feeds (latest API)

Hello Everyone,

I have my map up and running finally but have one more thing to figure out.
I am using the latest release of the API and call live XML data via the
following:

  Hazmat.setMap(map);
  var RichmondTraffic = new
google.maps.KmlLayer('http://map.richmondgov.com/Bing/Traffic/georssfeed.ashx'
);

  RichmondTraffic.setMap(map);
  var StateShelters = new
google.maps.KmlLayer('https://cop.vdem.virginia.gov/gis_feeds/ShelterGeoRSS.ashx'
);

  StateShelters.setMap(map);
  var trafficLayer = new google.maps.TrafficLayer();
  trafficLayer.setMap(map);


What I am trying to do now is create buttons to toggle each individual
feed on and off.  I have seen many examples doing this via toggling
the overlayhere's an example link:
http://code.google.com/apis/maps/documentation/v3/examples/overlay-hideshow.html
but cannot  seem to get my page to do this.  I'm not a programmer but
am trying my hardest to get this done.


I've tried looking at examples but this is a bit over my head and I'm
really at a standstill.  Would someone be willing to look at my code
and help me get started?  Here is the link to my map
(http://www.gamecarver.com/viperapp.html) and below is the html.  I'm
sure it's relatively simple, and once I see how the code works in my
case I can replicate it out no problem.


Thank you so much for taking the time to read my newbie post.

Jack







VIPER Traffic and Hazmat LIVE
http://maps.google.com/maps/api/js?sensor=true";>


var initialLocation;
var statepolice = new google.maps.LatLng(37.502168, -77.542212);


function initialize() {
  var myOptions = {
zoom: 14,
mapTypeId: google.maps.MapTypeId.ROADMAP
  };
  var map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);

  var Hazmat = new
google.maps.KmlLayer('https://cop.vdem.virginia.gov/gis_feeds/GeoRSS2.ashx'
<https://cop.vdem.virginia.gov/gis_feeds/GeoRSS2.ashx%27>);
  Hazmat.setMap(map);
  var RichmondTraffic = new
google.maps.KmlLayer('http://map.richmondgov.com/Bing/Traffic/georssfeed.ashx'
<http://map.richmondgov.com/Bing/Traffic/georssfeed.ashx%27>);

  RichmondTraffic.setMap(map);
  var StateShelters = new
google.maps.KmlLayer('https://cop.vdem.virginia.gov/gis_feeds/ShelterGeoRSS.ashx'
<https://cop.vdem.virginia.gov/gis_feeds/ShelterGeoRSS.ashx%27>);

  StateShelters.setMap(map);
  var trafficLayer = new google.maps.TrafficLayer();
  trafficLayer.setMap(map);
  // Safari supports the W3C Geolocation method
  if(navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {

  initialLocation = new
google.maps.LatLng(position.coords.latitude,position.coords.longitude);
  var placeMarker = new google.maps.Marker({
position: initialLocation,
map: map,
  });

  map.setCenter(initialLocation);
}, function() {
  handleNoGeolocation(browserSupportFlag);
});
  } else {
// Browser doesn't support Geolocation
handleNoGeolocation();
  }


  function handleNoGeolocation() {
initialLocation = statepolice;
map.setCenter(initialLocation);
  }
}



DIV.container {
width: 100%;
height: 50px;
align: center;
background-image:
url(http://www.gamecarver.com/img/appimages/DivHeaderBG2.png);

// display: table-cell;
vertical-align: middle;
font-size:medium;
font-family: sans-serif;
color: white;
text-align: center;
font-weight: bold;
}





  
  http://www.gamecarver.com/img/appimages/Header1.png";

  

  http://www.gamecarver.com/img/appimages/DivHeaderBG2.png); height:
25px; width: 100%">

  



-- 
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-maps-js-api...@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.



[Google Maps API v3]

Hello Everyone,

I have my map up and running finally but have one more thing to figure out.
I am using the latest release of the API and call live XML data via the
following:

  Hazmat.setMap(map);
  var RichmondTraffic = new
google.maps.KmlLayer('http://map.richmondgov.com/Bing/Traffic/georssfeed.ashx'
);
  RichmondTraffic.setMap(map);
  var StateShelters = new
google.maps.KmlLayer('https://cop.vdem.virginia.gov/gis_feeds/ShelterGeoRSS.ashx'
);
  StateShelters.setMap(map);
  var trafficLayer = new google.maps.TrafficLayer();
  trafficLayer.setMap(map);

What I am trying to do now is create buttons to toggle each individual
feed on and off.  I have seen many examples doing this via toggling
the overlayhere's an example link:
http://code.google.com/apis/maps/documentation/v3/examples/overlay-hideshow.html
but cannot  seem to get my page to do this.  I'm not a programmer but
am trying my hardest to get this done.

I've tried looking at examples but this is a bit over my head and I'm
really at a standstill.  Would someone be willing to look at my code
and help me get started?  Here is the link to my map
(http://www.gamecarver.com/viperapp.html) and below is the html.  I'm
sure it's relatively simple, and once I see how the code works in my
case I can replicate it out no problem.

Thank you so much for taking the time to read my newbie post.

Jack





VIPER Traffic and Hazmat LIVE
http://maps.google.com/maps/api/js?sensor=true
http://maps.google.com/maps/api/js?sensor=true>">

var initialLocation;
var statepolice = new google.maps.LatLng(37.502168, -77.542212);

function initialize() {
  var myOptions = {
zoom: 14,
mapTypeId: google.maps.MapTypeId.ROADMAP
  };
  var map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
  var Hazmat = new
google.maps.KmlLayer('https://cop.vdem.virginia.gov/gis_feeds/GeoRSS2.ashx');
  Hazmat.setMap(map);
  var RichmondTraffic = new
google.maps.KmlLayer('http://map.richmondgov.com/Bing/Traffic/georssfeed.ashx');
  RichmondTraffic.setMap(map);
  var StateShelters = new
google.maps.KmlLayer('https://cop.vdem.virginia.gov/gis_feeds/ShelterGeoRSS.ashx');
  StateShelters.setMap(map);
  var trafficLayer = new google.maps.TrafficLayer();
  trafficLayer.setMap(map);
  // Safari supports the W3C Geolocation method
  if(navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
  initialLocation = new
google.maps.LatLng(position.coords.latitude,position.coords.longitude);
  var placeMarker = new google.maps.Marker({
position: initialLocation,
map: map,
  });
  map.setCenter(initialLocation);
}, function() {
  handleNoGeolocation(browserSupportFlag);
});
  } else {
// Browser doesn't support Geolocation
handleNoGeolocation();
  }

  function handleNoGeolocation() {
initialLocation = statepolice;
map.setCenter(initialLocation);
  }
}


DIV.container {
width: 100%;
height: 50px;
align: center;
background-image:
url(http://www.gamecarver.com/img/appimages/DivHeaderBG2.png);
// display: table-cell;
vertical-align: middle;
font-size:medium;
font-family: sans-serif;
color: white;
text-align: center;
font-weight: bold;
}



  
  http://www.gamecarver.com/img/appimages/Header1.png
http://www.gamecarver.com/img/appimages/Header1.png>"
  
  http://www.gamecarver.com/img/appimages/DivHeaderBG2.png); height:
25px; width: 100%">
  




 PR: wait...  I: wait...  L:
wait... LD:
wait...  I: wait... wait...  Rank:
wait...  Traffic: wait...  Price:
wait... C:
wait... 

-- 
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-maps-js-api...@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.



[Google Maps API v3] Re: Dose MarkerManager works?

> Sorry, I mean -  I don't know why Google Maps JavaScript API dosen't
> support something like this.

For a lot of people, it's just unwanted bloat.
For others, it won't work the way they want - there is more than one
way to cluster and several variables in the way it works.

Anyone who wants to add it,  can easily add it.
Anyone who wants to modify it, can do so.

> http://www.shift.jp.org/en/map/
> This is a sample of v2 version of automatic clustering depends on zoom
level.

Yes, but its not built-in to the API.
It uses an add-on script for the API, KsGmaps.
It gives me slow script errors.

-- 
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-maps-js-api...@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.



[Google Maps API v3] Re: Dose MarkerManager works?


Sorry, I mean -  I don't know why Google Maps JavaScript API dosen't
support something like this.


On May 11, 3:17 am, TK  wrote:
> For user who use many (maybe over 100) makers (with XML/KML) would be
> great if could automatic clustering just set in myOptions i.e
> clustering:0/1 without MarkerManager or MarkerClusterer class.
>
> I don't know why support something like this. What do you think? :)
>
> http://www.shift.jp.org/en/map/
> This is a sample of v2 version of automatic clustering depends on zoom
> level.
>
> On May 11, 12:25 am, Fredrik Bonander
>
>
>
>  wrote:
> > I'll email him.
>
> > Well, unfortunately no. But the current project I'm working on will be 
> > released in the next couple of weeks. I'll update you with a link then.
>
> > ..fredrik
>
> > On 10 maj 2010, at 17.08, Björn Brala wrote:
>
> > > If you are interested in opensourcing it, joing the Utility library team. 
> > > I think you should email daniel...@google.com to get access :)
>
> > > Have you got a working example somewhere?
>
> > > 2010/5/10 Fredrik Bonander 
> > > Don't know if the problem got solved. But if anyone's interested I've 
> > > built a markermanager using google maps MVC object, that supports, 
> > > different zoom levels, custom marker and categorized markers.
>
> > > ..fredrik
>
> > > On 9 maj 2010, at 14.14, TK wrote:
>
> > >> Oh, I see I should use the MarkerClusterer class not MarkerManager.
>
> > >> Will try to do so.
>
> > >> Thank you very much.
>
> > >> On 5月9日, 午後9:04, Björn Brala  wrote:
> > >>> You will need to specify the zoom level on which the marker should be
> > >>> visible. It doesn´t do that automaticly.
>
> > >>> If you want automatic clustering you might want to use the Clusterer 
> > >>> class
> > >>> in the same library.
>
> > >>> 2010/5/7 TK 
>
> >  I would like to do like this with API v3.
> > http://www.shift.jp.org/en/map/
> >  This is v2 version without MarkerManager.
>
> >  Can't I do it with API v3 with MarkerManager?
>
> >  On May 7, 9:02 pm, TK  wrote:
> > > You're so kind. I've put the code onhttp://
> > www.shift.jp.org/ja/map/index.html
>
> > > I though there is one marker when zoom out but seems there are all
> > > markers.
>
> > > Is this right function of MarkerManager?
>
> > > On 5月6日, 午後11:01, Björn Brala  wrote:
>
> > >> I posted this to the wrong thread, oops.
>
> > >> I think i fixed it ;)
>
> > >>http://www.geostart.nl/test.html
>
> > >> 2010/4/22 TK 
>
> > >>> Hi again,
>
> > >>> Still have errors
>
> > >>> error: missing ) after argument list
> > >>> file:http://www.shift.jp.org/ja/map/index.html
> > >>> line: 49
> > >>> code: function createMarker(name, latlng) {
>
> > >>> error: initialize is not defined
> > >>> file:http://www.shift.jp.org/ja/map/index.html
> > >>> line: 1
>
> > >>> Sorry many ask.
>
> > >>> On Apr 22, 3:33 pm, Cosmin Pitu  wrote:
> >  Hi again,
>
> >  I think the problem is that you are closing the initialize()
> >  function
> >  as if it were a closure (e.g. something like
> >  "google.maps.event.addListener(foo, function() { });" , notice the
> >  usage of "});" instead of regular "}"), try changing :
>
> >  "mgr.addMarkers(markersForManager, 1, 22);
> > mgr.refresh();
> >   });
>
> >  }); "
>
> >  into
>
> >  "mgr.addMarkers(markersForManager, 1, 22);
> > mgr.refresh();
> >   });} " // function initialize() { } not function initialize() {
> >  }); -
>
> >  there's no parenthesis to close
>
> >  You might want to fix the indenting as Bjorn indicated.
> >  The call to refresh is ok, it's after the "for(".
>
> >  Hope this helps !
>
> >  --
> >  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-maps-js-api...@googlegroups.com.
> >  To unsubscribe from this group, send email to
> > >>> google-maps-js-api-v3+unsubscr...@googlegroups.com
> >  
>
> > >>> .
> >  For more options, visit this group athttp://
> > >>> groups.google.com/group/google-maps-js-api-v3?hl=en.
>
> > >>> --
> > >>> 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-maps-js-api...@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.
>
> > >> --
> > >> Bjorn Brala
> > >> www.GeoStart.nl/english/-Googlemaps-Swis
> > >>>

[Google Maps API v3] Re: Dose MarkerManager works?


For user who use many (maybe over 100) makers (with XML/KML) would be
great if could automatic clustering just set in myOptions i.e
clustering:0/1 without MarkerManager or MarkerClusterer class.

I don't know why support something like this. What do you think? :)

http://www.shift.jp.org/en/map/
This is a sample of v2 version of automatic clustering depends on zoom
level.



On May 11, 12:25 am, Fredrik Bonander
 wrote:
> I'll email him.
>
> Well, unfortunately no. But the current project I'm working on will be 
> released in the next couple of weeks. I'll update you with a link then.
>
> ..fredrik
>
> On 10 maj 2010, at 17.08, Björn Brala wrote:
>
>
>
> > If you are interested in opensourcing it, joing the Utility library team. I 
> > think you should email daniel...@google.com to get access :)
>
> > Have you got a working example somewhere?
>
> > 2010/5/10 Fredrik Bonander 
> > Don't know if the problem got solved. But if anyone's interested I've built 
> > a markermanager using google maps MVC object, that supports, different zoom 
> > levels, custom marker and categorized markers.
>
> > ..fredrik
>
> > On 9 maj 2010, at 14.14, TK wrote:
>
> >> Oh, I see I should use the MarkerClusterer class not MarkerManager.
>
> >> Will try to do so.
>
> >> Thank you very much.
>
> >> On 5月9日, 午後9:04, Björn Brala  wrote:
> >>> You will need to specify the zoom level on which the marker should be
> >>> visible. It doesn´t do that automaticly.
>
> >>> If you want automatic clustering you might want to use the Clusterer class
> >>> in the same library.
>
> >>> 2010/5/7 TK 
>
>  I would like to do like this with API v3.
> http://www.shift.jp.org/en/map/
>  This is v2 version without MarkerManager.
>
>  Can't I do it with API v3 with MarkerManager?
>
>  On May 7, 9:02 pm, TK  wrote:
> > You're so kind. I've put the code onhttp://
> www.shift.jp.org/ja/map/index.html
>
> > I though there is one marker when zoom out but seems there are all
> > markers.
>
> > Is this right function of MarkerManager?
>
> > On 5月6日, 午後11:01, Björn Brala  wrote:
>
> >> I posted this to the wrong thread, oops.
>
> >> I think i fixed it ;)
>
> >>http://www.geostart.nl/test.html
>
> >> 2010/4/22 TK 
>
> >>> Hi again,
>
> >>> Still have errors
>
> >>> error: missing ) after argument list
> >>> file:http://www.shift.jp.org/ja/map/index.html
> >>> line: 49
> >>> code: function createMarker(name, latlng) {
>
> >>> error: initialize is not defined
> >>> file:http://www.shift.jp.org/ja/map/index.html
> >>> line: 1
>
> >>> Sorry many ask.
>
> >>> On Apr 22, 3:33 pm, Cosmin Pitu  wrote:
>  Hi again,
>
>  I think the problem is that you are closing the initialize()
>  function
>  as if it were a closure (e.g. something like
>  "google.maps.event.addListener(foo, function() { });" , notice the
>  usage of "});" instead of regular "}"), try changing :
>
>  "mgr.addMarkers(markersForManager, 1, 22);
> mgr.refresh();
>   });
>
>  }); "
>
>  into
>
>  "mgr.addMarkers(markersForManager, 1, 22);
> mgr.refresh();
>   });} " // function initialize() { } not function initialize() {
>  }); -
>
>  there's no parenthesis to close
>
>  You might want to fix the indenting as Bjorn indicated.
>  The call to refresh is ok, it's after the "for(".
>
>  Hope this helps !
>
>  --
>  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-maps-js-api...@googlegroups.com.
>  To unsubscribe from this group, send email to
> >>> google-maps-js-api-v3+unsubscr...@googlegroups.com
>  
>
> >>> .
>  For more options, visit this group athttp://
> >>> groups.google.com/group/google-maps-js-api-v3?hl=en.
>
> >>> --
> >>> 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-maps-js-api...@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.
>
> >> --
> >> Bjorn Brala
> >> www.GeoStart.nl/english/-Googlemaps- Swis
>  Webdesignwww.twitter.com/bbrala
>
> >> --
> >> 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-maps-js-api...@googlegroups.com.
> >> To unsubscribe from this group, send email to
>  google-maps-js-api-v

[Google Maps API v3] Re: IE 8 Rendering Map Markers Incorrectly

It's showing the same in Chrome, IE and FireFox for me - at least if
you were referring to the flag markers.

Chad Killingsworth

On May 10, 11:57 am, JPArdy  wrote:
> Hi All,
>
> I have made some custom marker icons for a google map which started
> off at a resolution of 29 by 32 pixels.
> I have subsequently been asked to shrink these icons to 15 x 16
> pixels. This has been done and within the javascript I have updated
> the marker attributes to have the new size as follows
>
> var markerImage = new google.maps.MarkerImage(destination.MI,
> new google.maps.Size(15, 16),
> new google.maps.Point(0, 0),
> new google.maps.Point(0, 16));
>
> After this change the Icons render properly in Firefox etc, however in
> IE 8 they are stretched and generally useless.
>
> I have cleared cache and done followed all of the usual steps to make
> sure the new version of the image is being loaded in IE to no avail.
>
> Any assistance would be very helpfull
>
> This is the test page
>
> http://trekamericalive.kmp.co.uk/
>
> Cheers
> JP
>
> --
> 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-maps-js-api...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-maps-js-api-v3+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-maps-js-api-v3?hl=en.

-- 
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-maps-js-api...@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.



[Google Maps API v3] IE 8 Rendering Map Markers Incorrectly

Hi All,

I have made some custom marker icons for a google map which started
off at a resolution of 29 by 32 pixels.
I have subsequently been asked to shrink these icons to 15 x 16
pixels. This has been done and within the javascript I have updated
the marker attributes to have the new size as follows

var markerImage = new google.maps.MarkerImage(destination.MI,
new google.maps.Size(15, 16),
new google.maps.Point(0, 0),
new google.maps.Point(0, 16));

After this change the Icons render properly in Firefox etc, however in
IE 8 they are stretched and generally useless.

I have cleared cache and done followed all of the usual steps to make
sure the new version of the image is being loaded in IE to no avail.

Any assistance would be very helpfull

This is the test page

http://trekamericalive.kmp.co.uk/

Cheers
JP

-- 
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-maps-js-api...@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.



Re: [Google Maps API v3] Re: Dose MarkerManager works?

I'll email him. 

Well, unfortunately no. But the current project I'm working on will be released 
in the next couple of weeks. I'll update you with a link then.

..fredrik


On 10 maj 2010, at 17.08, Björn Brala wrote:

> If you are interested in opensourcing it, joing the Utility library team. I 
> think you should email daniel...@google.com to get access :)
> 
> Have you got a working example somewhere?
> 
> 2010/5/10 Fredrik Bonander 
> Don't know if the problem got solved. But if anyone's interested I've built a 
> markermanager using google maps MVC object, that supports, different zoom 
> levels, custom marker and categorized markers.
> 
> ..fredrik
> 
> 
> 
> On 9 maj 2010, at 14.14, TK wrote:
> 
>> 
>> Oh, I see I should use the MarkerClusterer class not MarkerManager.
>> 
>> Will try to do so.
>> 
>> Thank you very much.
>> 
>> 
>> On 5月9日, 午後9:04, Björn Brala  wrote:
>>> You will need to specify the zoom level on which the marker should be
>>> visible. It doesn´t do that automaticly.
>>> 
>>> If you want automatic clustering you might want to use the Clusterer class
>>> in the same library.
>>> 
>>> 2010/5/7 TK 
>>> 
>>> 
>>> 
>>> 
>>> 
 I would like to do like this with API v3.
 http://www.shift.jp.org/en/map/
 This is v2 version without MarkerManager.
>>> 
 Can't I do it with API v3 with MarkerManager?
>>> 
 On May 7, 9:02 pm, TK  wrote:
> You're so kind. I've put the code onhttp://
 www.shift.jp.org/ja/map/index.html
>>> 
> I though there is one marker when zoom out but seems there are all
> markers.
>>> 
> Is this right function of MarkerManager?
>>> 
> On 5月6日, 午後11:01, Björn Brala  wrote:
>>> 
>> I posted this to the wrong thread, oops.
>>> 
>> I think i fixed it ;)
>>> 
>> http://www.geostart.nl/test.html
>>> 
>> 2010/4/22 TK 
>>> 
>>> Hi again,
>>> 
>>> Still have errors
>>> 
>>> error: missing ) after argument list
>>> file:http://www.shift.jp.org/ja/map/index.html
>>> line: 49
>>> code: function createMarker(name, latlng) {
>>> 
>>> error: initialize is not defined
>>> file:http://www.shift.jp.org/ja/map/index.html
>>> line: 1
>>> 
>>> Sorry many ask.
>>> 
>>> On Apr 22, 3:33 pm, Cosmin Pitu  wrote:
 Hi again,
>>> 
 I think the problem is that you are closing the initialize()
 function
 as if it were a closure (e.g. something like
 "google.maps.event.addListener(foo, function() { });" , notice the
 usage of "});" instead of regular "}"), try changing :
>>> 
 "mgr.addMarkers(markersForManager, 1, 22);
mgr.refresh();
  });
>>> 
 }); "
>>> 
 into
>>> 
 "mgr.addMarkers(markersForManager, 1, 22);
mgr.refresh();
  });} " // function initialize() { } not function initialize() {
 }); -
>>> 
 there's no parenthesis to close
>>> 
 You might want to fix the indenting as Bjorn indicated.
 The call to refresh is ok, it's after the "for(".
>>> 
 Hope this helps !
>>> 
 --
 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-maps-js-api...@googlegroups.com.
 To unsubscribe from this group, send email to
>>> google-maps-js-api-v3+unsubscr...@googlegroups.com
 
>>> 
>>> .
 For more options, visit this group athttp://
>>> groups.google.com/group/google-maps-js-api-v3?hl=en.
>>> 
>>> --
>>> 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-maps-js-api...@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.
>>> 
>> --
>> Bjorn Brala
>> www.GeoStart.nl/english/-Googlemaps - Swis
 Webdesignwww.twitter.com/bbrala
>>> 
>> --
>> 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-maps-js-api...@googlegroups.com.
>> To unsubscribe from this group, send email to
 google-maps-js-api-v3+unsubscr...@googlegroups.com
 .
>> For more options, visit this group athttp://
 groups.google.com/group/google-maps-js-api-v3?hl=en.
>>> 
> --
> 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-maps-js-api...@googlegroups.com.
> To unsubscribe from this group, send email to
 google-maps-js-api-v3+unsubscr...@googlegroups.com
 .
>>

Re: [Google Maps API v3] Re: Dose MarkerManager works?

If you are interested in opensourcing it, joing the Utility library team. I
think you should email
daniel...@google.comto
get access :)

Have you got a working example somewhere?

2010/5/10 Fredrik Bonander 

> Don't know if the problem got solved. But if anyone's interested I've built
> a markermanager using google maps MVC object, that supports, different zoom
> levels, custom marker and categorized markers.
>
> ..fredrik
>
>
>
> On 9 maj 2010, at 14.14, TK wrote:
>
>
> Oh, I see I should use the MarkerClusterer class not MarkerManager.
>
> Will try to do so.
>
> Thank you very much.
>
>
> On 5月9日, 午後9:04, Björn Brala  wrote:
>
> You will need to specify the zoom level on which the marker should be
>
> visible. It doesn´t do that automaticly.
>
>
> If you want automatic clustering you might want to use the Clusterer class
>
> in the same library.
>
>
> 2010/5/7 TK 
>
>
>
>
>
>
> I would like to do like this with API v3.
>
> http://www.shift.jp.org/en/map/
>
> This is v2 version without MarkerManager.
>
>
> Can't I do it with API v3 with MarkerManager?
>
>
> On May 7, 9:02 pm, TK  wrote:
>
> You're so kind. I've put the code onhttp://
>
> www.shift.jp.org/ja/map/index.html
>
>
> I though there is one marker when zoom out but seems there are all
>
> markers.
>
>
> Is this right function of MarkerManager?
>
>
> On 5月6日, 午後11:01, Björn Brala  wrote:
>
>
> I posted this to the wrong thread, oops.
>
>
> I think i fixed it ;)
>
>
> http://www.geostart.nl/test.html
>
>
> 2010/4/22 TK 
>
>
> Hi again,
>
>
> Still have errors
>
>
> error: missing ) after argument list
>
> file:http://www.shift.jp.org/ja/map/index.html
>
> line: 49
>
> code: function createMarker(name, latlng) {
>
>
> error: initialize is not defined
>
> file:http://www.shift.jp.org/ja/map/index.html
>
> line: 1
>
>
> Sorry many ask.
>
>
> On Apr 22, 3:33 pm, Cosmin Pitu  wrote:
>
> Hi again,
>
>
> I think the problem is that you are closing the initialize()
>
> function
>
> as if it were a closure (e.g. something like
>
> "google.maps.event.addListener(foo, function() { });" , notice the
>
> usage of "});" instead of regular "}"), try changing :
>
>
> "mgr.addMarkers(markersForManager, 1, 22);
>
>mgr.refresh();
>
>  });
>
>
> }); "
>
>
> into
>
>
> "mgr.addMarkers(markersForManager, 1, 22);
>
>mgr.refresh();
>
>  });} " // function initialize() { } not function initialize() {
>
> }); -
>
>
> there's no parenthesis to close
>
>
> You might want to fix the indenting as Bjorn indicated.
>
> The call to refresh is ok, it's after the "for(".
>
>
> Hope this helps !
>
>
> --
>
> 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-maps-js-api...@googlegroups.com.
>
> To unsubscribe from this group, send email to
>
> google-maps-js-api-v3+unsubscr...@googlegroups.com
> 
> >
>
> 
> 
> >
>
>
> .
>
> For more options, visit this group athttp://
>
> groups.google.com/group/google-maps-js-api-v3?hl=en.
>
>
> --
>
> 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-maps-js-api...@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.
>
>
> --
>
> Bjorn Brala
>
> www.GeoStart.nl/english/-Googlemaps - Swis
>
> Webdesignwww.twitter.com/bbrala
>
>
> --
>
> 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-maps-js-api...@googlegroups.com.
>
> To unsubscribe from this group, send email to
>
> google-maps-js-api-v3+unsubscr...@googlegroups.com
> 
> >
>
> .
>
> For more options, visit this group athttp://
>
> groups.google.com/group/google-maps-js-api-v3?hl=en.
>
>
> --
>
> 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-maps-js-api...@googlegroups.com.
>
> To unsubscribe from this group, send email to
>
> google-maps-js-api-v3+unsubscr...@googlegroups.com
> 
> >
>
> .
>
> For more options, visit this group athttp://
>
> groups.google.com/group/google-maps-js-api-v3?hl=en.
>
>
> --
>
> 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-maps-js-api...@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.
>
>
> --
>
> Bjorn Bral

[Google Maps API v3] Re: Detect marker inside a polygon

The algorithm is explained here
http://alienryderflex.com/polygon/

-- 
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-maps-js-api...@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.



[Google Maps API v3] Re: Get LatLng on click event on marker

Try 'click' instead of 'dragstart' and I think it works right away.

'dragstart' event does not return any mouse object.

-- 
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-maps-js-api...@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.



Re: [Google Maps API v3] ElevationService not working

The code:
var map = new GMap2(document.getElementById(
"map"));
map.removeMapType(G_HYBRID_MAP);
map.removeMapType(G_NORMAL_MAP);
map.setMapType(G_PHYSICAL_MAP);

is clearly v2 only, not v3. Look at the v3 initialization first in the
examples.

vriendelijke groeten,
Ronny Aerts


2010/5/10 Ranjita Km 

> I have been using google maps api version 2 for quite sometime. Wanted
> to use the elevation service feature so moved to version 3.Was very
> happy about this feature in google. Saves me lot of effort. Thanks a
> lot.But i am facing a problem using it.
>
> From the documents i have read it does not require a version number or
> an API key to use version 3. Hope i got that rite. Application works
> perfectly fine in version 2. Works fine in version 3 too.
>
> But when i add  the below statement for ElevationService it throws up
> a runtime error as Object expected what could be wrong
>
> var elevator = new google.maps.ElevationService();
>
> Referred the sample code given in "http://code.google.com/apis/maps/
> documentation/v3/services.html"
> under elevation section.
>
> can someone help please. I dont want to use other 3rd party tools for
> elevation information. I have been using google map api and want to
> continue in that direction.
> Code Snippet:
> var map = new GMap2(document.getElementById("map"));
> map.removeMapType(G_HYBRID_MAP);
> map.removeMapType(G_NORMAL_MAP);
> map.setMapType(G_PHYSICAL_MAP);
> map.setCenter(new google.maps.LatLng( GET_LATITUDE , GET_LONGITUDE ),
> GET_ZOOM_VALUE );
>  var elevator = new google.maps.ElevationService();
>
>
>
> --
> 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-maps-js-api...@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.
>
>

-- 
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-maps-js-api...@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.



Re: [Google Maps API v3] Get LatLng on click event on marker

Hi MT
You can't exactly "alert" at LatLng as it is still an javascript object. You
could however alert the individual elements (lat, lng) by doing the
following:

alert(latLng.lat()); or alert(latLng.lng());

I hope that helps.
Jason

On Mon, May 10, 2010 at 4:43 AM, Mattias Nordin wrote:

> Hi.
>
> Im trying to call a function where i need the coordinate as input but
> i cant figure out how to do this. I was hoping the the following
> syntax would be possible.
>
> Is this a limitation in API3 or am i doing it wrong?
>
> var map;
> function initialize() {
>  var myLatlng = new google.maps.LatLng(-25.363882,131.044922);
>  var myOptions = {
>zoom: 4,
>center: myLatlng,
>mapTypeId: google.maps.MapTypeId.ROADMAP
>  }
>  map = new google.maps.Map(document.getElementById("map_canvas"),
> myOptions);
>
>  google.maps.event.addListener(map, 'dragstart', function(event) {
>   test(event.latLng);
>  });
>
> }
>
>
> function test(location) {
>   alert(location)
> }
>
>
> *** The alert is not returning the LatLng position ***
>
> --
> 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-maps-js-api...@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.
>
>

-- 
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-maps-js-api...@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.



Re: [Google Maps API v3] Re: Dose MarkerManager works?

Don't know if the problem got solved. But if anyone's interested I've built a 
markermanager using google maps MVC object, that supports, different zoom 
levels, custom marker and categorized markers.

..fredrik



On 9 maj 2010, at 14.14, TK wrote:

> 
> Oh, I see I should use the MarkerClusterer class not MarkerManager.
> 
> Will try to do so.
> 
> Thank you very much.
> 
> 
> On 5月9日, 午後9:04, Björn Brala  wrote:
>> You will need to specify the zoom level on which the marker should be
>> visible. It doesn´t do that automaticly.
>> 
>> If you want automatic clustering you might want to use the Clusterer class
>> in the same library.
>> 
>> 2010/5/7 TK 
>> 
>> 
>> 
>> 
>> 
>>> I would like to do like this with API v3.
>>> http://www.shift.jp.org/en/map/
>>> This is v2 version without MarkerManager.
>> 
>>> Can't I do it with API v3 with MarkerManager?
>> 
>>> On May 7, 9:02 pm, TK  wrote:
 You're so kind. I've put the code onhttp://
>>> www.shift.jp.org/ja/map/index.html
>> 
 I though there is one marker when zoom out but seems there are all
 markers.
>> 
 Is this right function of MarkerManager?
>> 
 On 5月6日, 午後11:01, Björn Brala  wrote:
>> 
> I posted this to the wrong thread, oops.
>> 
> I think i fixed it ;)
>> 
> http://www.geostart.nl/test.html
>> 
> 2010/4/22 TK 
>> 
>> Hi again,
>> 
>> Still have errors
>> 
>> error: missing ) after argument list
>> file:http://www.shift.jp.org/ja/map/index.html
>> line: 49
>> code: function createMarker(name, latlng) {
>> 
>> error: initialize is not defined
>> file:http://www.shift.jp.org/ja/map/index.html
>> line: 1
>> 
>> Sorry many ask.
>> 
>> On Apr 22, 3:33 pm, Cosmin Pitu  wrote:
>>> Hi again,
>> 
>>> I think the problem is that you are closing the initialize()
>>> function
>>> as if it were a closure (e.g. something like
>>> "google.maps.event.addListener(foo, function() { });" , notice the
>>> usage of "});" instead of regular "}"), try changing :
>> 
>>> "mgr.addMarkers(markersForManager, 1, 22);
>>>mgr.refresh();
>>>  });
>> 
>>> }); "
>> 
>>> into
>> 
>>> "mgr.addMarkers(markersForManager, 1, 22);
>>>mgr.refresh();
>>>  });} " // function initialize() { } not function initialize() {
>>> }); -
>> 
>>> there's no parenthesis to close
>> 
>>> You might want to fix the indenting as Bjorn indicated.
>>> The call to refresh is ok, it's after the "for(".
>> 
>>> Hope this helps !
>> 
>>> --
>>> 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-maps-js-api...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>> google-maps-js-api-v3+unsubscr...@googlegroups.com
>>> 
>> 
>> .
>>> For more options, visit this group athttp://
>> groups.google.com/group/google-maps-js-api-v3?hl=en.
>> 
>> --
>> 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-maps-js-api...@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.
>> 
> --
> Bjorn Brala
> www.GeoStart.nl/english/-Googlemaps - Swis
>>> Webdesignwww.twitter.com/bbrala
>> 
> --
> 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-maps-js-api...@googlegroups.com.
> To unsubscribe from this group, send email to
>>> google-maps-js-api-v3+unsubscr...@googlegroups.com
>>> .
> For more options, visit this group athttp://
>>> groups.google.com/group/google-maps-js-api-v3?hl=en.
>> 
 --
 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-maps-js-api...@googlegroups.com.
 To unsubscribe from this group, send email to
>>> google-maps-js-api-v3+unsubscr...@googlegroups.com
>>> .
 For more options, visit this group athttp://
>>> groups.google.com/group/google-maps-js-api-v3?hl=en.
>> 
>>> --
>>> 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-maps-js-api...@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.
>> 
>> --
>> Bjorn Brala
>> www.GeoStart.nl/englis

[Google Maps API v3] ElevationService not working

I have been using google maps api version 2 for quite sometime. Wanted
to use the elevation service feature so moved to version 3.Was very
happy about this feature in google. Saves me lot of effort. Thanks a
lot.But i am facing a problem using it.

>From the documents i have read it does not require a version number or
an API key to use version 3. Hope i got that rite. Application works
perfectly fine in version 2. Works fine in version 3 too.

But when i add  the below statement for ElevationService it throws up
a runtime error as Object expected what could be wrong

var elevator = new google.maps.ElevationService();

Referred the sample code given in "http://code.google.com/apis/maps/
documentation/v3/services.html" under elevation section.

can someone help please. I dont want to use other 3rd party tools for
elevation information. I have been using google map api and want to
continue in that direction.
Code Snippet:
var map = new GMap2(document.getElementById("map"));
map.removeMapType(G_HYBRID_MAP);
map.removeMapType(G_NORMAL_MAP);
map.setMapType(G_PHYSICAL_MAP);
map.setCenter(new google.maps.LatLng( GET_LATITUDE , GET_LONGITUDE ),
GET_ZOOM_VALUE );
 var elevator = new google.maps.ElevationService();



-- 
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-maps-js-api...@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.



[Google Maps API v3] Re: Custom Map Type with background color

Thanks William, fits really good, to use realtime data will have to
keep it with all the image... what tool you used to get the bounds ?

regards

 Norman

On May 9, 3:58 am, William  wrote:
> On May 9, 12:35 am, neavilag  wrote:
>
> > William, this is great, actually your example worked as I wanted check
> > the link, I am testing on Localhost so cannot see it live.
>
> >http://screencast.com/t/MDIyNDYzN
>
> > Btw, seems we are working with similar data, our CAFFG data is a new
> > approach for TRMM in Central America, have you seen it ? We will use
> > this information a lot since we are starting rainy season here..
>
> >http://www.hrc-lab.org/right_nav_widgets/realtime_caffg/index.php
>
> I tried this CAFFG data and it looks good when you trim the image
> exactly to size.  Also I made a control to toggle the Hybrid Label
> display, see this map:
>
> http://www.william-map.com/20100508/2/caffg.htm
>
> ...
>
> --
> 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-maps-js-api...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-maps-js-api-v3+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-maps-js-api-v3?hl=en.

-- 
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-maps-js-api...@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.



[Google Maps API v3] Custom overlay cause SSL warning on IE

Hi

I recently added custom overlay to add custom labels on markers using
following link

http://code.google.com/apis/maps/documentation/v3/overlays.html#CustomOverlays

I am using google maps V3 on SSL. The problem is when i use method
mentioned in above link, it causes SSL warning message on IE. All
other things are fine labels formatting and opacity is also fine. I am
pretty sure about this because when i remove the code for labels the
message is gone.
Here is the code for label

function Label(opt_options) {
 // Initialization
 this.setValues(opt_options);

 // Label specific
 var span = this.span_ = document.createElement('span');
 span.style.cssText = "position: absolute; z-index:1; white-space:
nowrap;font-weight:bold";

 var div = this.div_ = document.createElement('div');
 div.appendChild(span);
 div.style.cssText = 'position: absolute; display: none';;
};
Label.prototype = new google.maps.OverlayView();

// Implement onAdd
Label.prototype.onAdd = function() {
 var pane = this.getPanes().overlayLayer;
 pane.appendChild(this.div_);

 // Ensures the label is redrawn if the text or position is changed.
 var me = this;
 this.listeners_ = [
   google.maps.event.addListener(this, 'position_changed',
   function() { me.draw(); }),
   google.maps.event.addListener(this, 'text_changed',
   function() { me.draw(); })
 ];
};

// Implement onRemove
Label.prototype.onRemove = function() {
 this.div_.parentNode.removeChild(this.div_);


 for (var i = 0, I = this.listeners_.length; i < I; ++i) {
   google.maps.event.removeListener(this.listeners_[i]);
 }
};


Label.prototype.draw = function() {
 var projection = this.getProjection();
 var position = projection.fromLatLngToDivPixel(this.get('position'));
 var div = this.div_;
 div.style.left = position.x + 'px';
 div.style.top = position.y + 'px';
 div.style.display = 'block';

 this.span_.innerHTML = this.get('text').toString();
};

Any help is appreciated.
Thanks

-- 
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-maps-js-api...@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.



[Google Maps API v3] Detect marker inside a polygon

Hi,
I've been searching everywhere to find how I can detect if a marker is
placed inside a polygon using the version 3.
Does someone already had the issue?

Best,
Greg

-- 
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-maps-js-api...@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.



[Google Maps API v3] Get LatLng on click event on marker

Hi.

Im trying to call a function where i need the coordinate as input but
i cant figure out how to do this. I was hoping the the following
syntax would be possible.

Is this a limitation in API3 or am i doing it wrong?

var map;
function initialize() {
  var myLatlng = new google.maps.LatLng(-25.363882,131.044922);
  var myOptions = {
zoom: 4,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
  }
  map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);

  google.maps.event.addListener(map, 'dragstart', function(event) {
   test(event.latLng);
  });

}


function test(location) {
   alert(location)
}


*** The alert is not returning the LatLng position ***

-- 
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-maps-js-api...@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.



[Google Maps API v3] Geocoder: problem with apostrophe ?

Hello,

I'm testing the geocoder ( using this one from the documentation :
http://code.google.com/intl/fr/apis/maps/documentation/v3/examples/geocoding-simple.html
) and i noticed this :

If i test with this address :
"10 rue jeanne d'arc, orléans",   the geocoder give me an error.

but if i test with the same address without apostrophe (" ' ") :
"10 rue jeanne d arc, orléans", the geocoder woks perfectly.

I wonder if i miss something :)


riccco

-- 
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-maps-js-api...@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.



[Google Maps API v3] Re: FYI: New Release (2010/04/28)

Thank you very much William. You studied the issue deeply and
presented clear solutions.

So the good old
xmlns:v="urn:schemas-microsoft-com:vml"
is still a safe practice for IE if you want to load the map before
body onload.

I know that loading map script inline is 'illegal' but in many cases I
want the map to be the first thing rendered on a page.

One teaching was that it is a good practice to have AdSense on example
pages.

It was most surprising to me that map size has something to do with
this.


thanks
Esa

-- 
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-maps-js-api...@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.



[Google Maps API v3] Re: Marker Colors for Multiple Data Feeds - New API Realease

> Thanks beenso basically I need to style the makers in the XML?  How do I
> do that?

http://code.google.com/apis/kml/documentation/kml_tut.html

-- 
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-maps-js-api...@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.



[Google Maps API v3] Re: not working for getting xml?

> but can you give a example how to do it?...

In your page, the downloadUrl() callback calculates the map centre you
would like, as myLatLng.

If you want to use that to centre the map, you must use it inside the
callback function.

So move your map creation lines to WITHIN the callback
 var myOptions = {  center: myLatLng, . };
 map = new google.maps.Map(

-- 
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-maps-js-api...@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.



[Google Maps API v3] Re: not working for getting xml?

owke..

but can you give a example how to do it?...

gr.

On Apr 22, 12:23 am, Rossko  wrote:
> > yeah the center info should get it out of the xml file..
>
> And so it does.
> But you are trying to use the info to centre the map long before the
> XML has been returned, and before the info is available.
> downloadUrl() is asynchronous.
> If you want to use the info it returns, you must use it in the
> callback.  That's the place to centre the map.
>
> --
> 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-maps-js-api...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-maps-js-api-v3+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-maps-js-api-v3?hl=en.

-- 
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-maps-js-api...@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.