Select From a list of layers to overlay on google maps - google-maps-api-3

Can anyone advise me on how to select layers from a checkbox overlay the selected layer on google maps?

JavaScript Version:
Please consult the Google Maps API documentation.
https://developers.google.com/maps/documentation/javascript/layers#TrafficLayer
Here's a good example of adding and removing overlays.
https://developers.google.com/maps/documentation/javascript/examples/overlay-remove
Java Version:
Here's a nice example for Java. It even has a radio box to switch between layers.
http://demo.gwt-openlayers.org/gwt_ol_showcase/GwtOpenLayersShowcase.html?example=Basic%20Google%20V3%20example

Your question is not really clear to me.
Like in the previous answer : this is an example on how to use google v3 --> http://demo.gwt-openlayers.org/gwt_ol_showcase/GwtOpenLayersShowcase.html?example=Basic%20Google%20V3%20example
Overlay layers can be realized using setIsBaseLayer(false) method.
Base layers are drawn add the bottom, and can be switched using a radio button.
Overlay layers are drawn on top of the base layer, and can be switched using checkboxes (and thus multiple overlay layers can be enabled at once).
Or are you reffering to the specific google overlays (like traffic layer) ?

Related

Is there a way to toggle MarkerClustererPlus

I use MarkerClustererPlus for clustering markers on google map (v3)
Is there a way to toggle clustering with a function.
Namely I dont wont to effect markers, but only toggle visibility of cluster icons.
For showing it we have property - repaint, but I couldnt find the property to hide clusters.
set the map-option of the markerClusterer
clustererObject.setOptions({map:null});//hides the clusterIcons
clustererObject.setOptions({map:mapObject});//restores the clusterIcons
Note: when you set the map to null all clustered markers will appear as markers, I'm not sure if this is the desired behaviour
If you're looking to just hide all clusters, then Dr. Molle's answer works great. If you're looking to hide just a sub-group/sub-section of your maps markers, then a refresh/rebuild will be needed.
Here's an advanced example that may help others finding this page thru Google Search.
http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.1.1/examples/advanced_example.html

How to create an interactive map in ASP.NET

I've created a page that shows a map of my complex. The idea is to put icons on the map representing where computers are located, and the user will be able to click on the icon to remote into the machine.
But I also want the icons to be moveable. Everyone should be able to open the page and drag the computer icon around. Is this possible using only ASP.NET?
you can use following options but not limited :)
Google Maps
Bing Maps
bing map sdk
You could use the html <map> and <area> tags along with an image of your complex to create a map that has points on it.
You can see an example of this here, however this is probably overkill for your requirements. All you need to do is set the coord and shape attributes for each area, this will give you an element that would represent the computers.
I'm not sure if you can manipulate these in javascript or jQuery though, as I have never tried, but hopefully this will give you a starting point.

Text Layer google-maps-api-3

I have been working with the Google Maps API V3 on a project for some time. I am using the polygon shapes to represent buildings on the map of my campus and now I'm looking for a solution to the issue of the shapes being underneath the text for the map. This includes building games in specific for my campus. I was wondering if there was a way to move the order in which they are displayed so that polygons go under the built in text layer for google maps, and if so, how I would achieve that.
Thanks in advanced,
Mike
I don't think this is possible. Unless the map names are turned off via map options they appear to be a part of the tile image.
Edit: You could possibly do something like turn off the labels and use a library like infobox to make your own.

Changing nodes icon and clickable area in Google Maps Drawing Library (polygon)

As you know, Google Maps Drawing Library is easy to implement, but it gives very little control to the developer.
(Here is a sample of the library at use http://gmaps-samples-v3.googlecode.com/svn/trunk/drawing/drawing-tools.html )
I would like to change the default settings of drawing polygons in two ways:
first, I'd like to use another icon for the nodes connecting lines instead of the small square icon
second, I like to increase the clickable area around the initial node.
Do you know if it's possible to do these changes to the drawing library?
I appreciate your help.
It is not possible with the existing drawing manager functionality. Please go through the following issue in Google maps api issues
http://code.google.com/p/gmaps-api-issues/issues/detail?can=2&start=0&num=100&q=drawing%20library&colspec=ID%20Type%20Status%20Introduced%20Fixed%20Summary%20Stars%20ApiType%20Internal&groupby=&sort=&id=3760

Creating an interactive map with CSS

Based on the design below, is it possible to create the map just using CSS? If so, how?
So as you can see, when you hover over a state the name will appear and change the color of the state. On clicking it will info below the map per state.
UPDATE 1:
Can it be done using absolute positioning, z-index and hover states on a button?
UPDATE 2:
With a slight tweak to the design, would it be possible to have a flat image for the map and plotting dot's on it for each state that would include a hover (using the same tab style as the image example)? Each dot being an image. Am I right in saying that the complication of the design is to highlight the right area when hovered? Therefore, just having a dot would solve it right?
I was interested in this too and found this example (USA) MAP if you look into the source code there is area for each state that look like <area onmouseover="show(this)" onmouseout="hide()" onclick="fform.tg.checked=false;togl()" shape="poly" coords="179,33,174,66,230,67,225,35,179,33,179,33" href="us-nd.html">. You can read more about and tags in W3C link. I think its the only way how to do this without flash or something... But it cant be done without a little JS. To get the coords, I would asume you just open your image in some editor that shows coords(gimp or something) and manually find them out...
No. If it had rectangular shapes yes but with a lot of work.
You really need javascript on this one.
You might want to try a Javascript mapping library - www.openlayers.org is the market leader (and free and open source).
You get your US state map in the right format (GML for example) then you can pretty much cut n paste from one of the openlayers examples. Hovering and clicking are handled by event functions. They can then do things like updating your info box below the map.
Note that if you want Alaska and Hawaii as in the picture and all you can find is a geographic state map, you might have to use a GIS to shift the features around. Quantum GIS is a free and open-source GIS that can do this for you. Help for that can be found on gis.stackexchange.com!
If you're willing to use javascript, jQuery more specifically, here is a nice plug-in/tutorial on how to do what it seems like you'd like to. http://playground.mobily.pl/jquery/mobily-map.html. It won't do the states exactly, but it will allow you to drop pins and such.
Update: This seems to be exactly what you're looking for: http://playground.mobily.pl/tutorials/building-an-interactive-map-with-raphael.html. It includes a rather indepth tutorial as well.
Here is another interactive US map I found myself: http://www.fla-shop.com/products/html5/united-states/us/ It is purely javascript with customizable popups.

Resources