I'm doing an offline mapping of my school building. One of the buildings have 9 floors. Just started to test and put two ground Overlays that way:
layer1 = new google.maps.GroundOverlay('images/2floor.svg', layerBounds);
layer2 = new google.maps.GroundOverlay('images/1floor.svg', layerBounds);
In other words, I've placed the two layers in the same spot.
I believed that when I increase zoom in the area, the floor picker would be shown, but that doesn't happen.
I appreciate any help with this.
The V3 version of javascript GroundOverlay does not support what you want to do. Google Maps will just lay the second GroundOverlay over the first, and the first will never show.
With the upcoming demise of Google Maps Engine, and because we had a need to show different imagery at different zoom levels plus non-rectangular satellite imagery, we wrote a GroundOverlayEX javascript class for Google Maps API V3. It does everything the Google Earth version of GroundOverlay does (including image rotation, non-rectangular images, drawing order, support for switching images at different zoom levels, etc).
The class is up on GitHub at https://github.com/azmikemm/GroundOverlayEX
There is complete API documentation there too (documentation.txt). This is a recent coding effort.
If you want to see a working example of the class in action, you can visit
https://sites.google.com/site/issearthatnight/. That Google Map is showing 100s of GroundOverlays drapped over North America and at the default zoom is showing low resolution images from NASA. If you zoom in, all the GroundOverlayEX objects auto-switch to high resolution images from NASA.
The zoom-switching is completely configurable in the class, and can have as many different per-zoom-level images as you want.
If you talk about the Indoor level picker of Maps, you need a processed floor plan by google.
To do this, go to (your plan will be visible by all on GMaps) :
https://www.google.com/maps/about/partners/indoormaps/
A simple GroundOverlay is just a layer, the only possibility to do that is to create buttons for changing floor...
Thanks, I'm using Leaflet with the leaflet-indoor library (https://github.com/cbaines/leaflet-indoor) to do that.
This is an example of what I want to do: http://cbaines.net/projects/osm/leaflet-indoor/examples/
Still accepting help or advice on this subject...
Related
So, basic gist is, I have my own tiles of not the real world I'd like to display with the Google Maps viewer. I've found examples of how to split an existing single image into tiles for use with it, but nothing that deals with setting up your own tiler.
I have map data such as this:
https://dl.dropboxusercontent.com/u/44766482/superimage/index.html
Which right now is just a bunch of 1600x1600 images in an html table. This naive method works, but I'd like to switch to the more robust google api for better zooming and smarter streaming of the image data.
I've been unable to find a good example of how to generate your own tiles for the zoom levels and bring it together with some html/js.
If you want some more information for the goal process;
I have a python script that can output any size tiles of the map, at any zoom level. I'd like to bundle those together into a google maps api website. But in my own efforts I have not found a good example or documentation of how to do that. For one, I can only find examples of how the zoom levels work for the real world map, but not for a custom one.
Edit:
Got most things working as I want them, but I'm still confused regarding the "center" that can be set, as it's in lat and lng, which don't apply. I'd also like to set boundaries as currently it tries to load .png files outside of the maps range.
My current progress:
https://dl.dropboxusercontent.com/u/44766482/googlemapspreview/index.html
I think what you are looking for is the google maps imageMapTypes:
https://developers.google.com/maps/documentation/javascript/maptypes#ImageMapTypes
Basically, each zoom level is the 4 lower zoom tiles combined. A Projection function can be skipped to get orthogonal mapping.
Does the CloudMade API have the ability to control the z-order or z-index of the marker overlays (e.g.icons)?
I have used this before in Google Maps to make certain icons with more importance draw over the top of other icons with lesser importance (especially in some zoom levels where they may bunch together).
The Google Maps GMarker has the zIndexProcess option to handle this. Does anyone know if CloudMade has this facility? I have scoured the API docs and found nothing. Or does anyone here perhaps have an ad-hoc method that ensures one marker (or group of makers) will be drawn on a layer above the other?
Currently this feature is not available at CloudMade, but I'll add it to our Feature Requests list..
I have an application where I need to show historical maps. Is there a way to use the Google API for that, ie show a map of Europe for the year 1800, 1900 etc, with different borders and country names?
I am not particular to any language and also welcome solutions that might not involve the Google API but another library or service
I am not aware about such functionality in Google Maps right now. However, it should be noted that Google Earth has several historical maps (including a world map from 1790, a 1833 US map, a 1680 map of Tokyo, and a 1716 map of Paris), so chances are they will add this functionality to Google Maps at some point in the future.
Google doesnt have historic ability built in but it does have code to allow you to tile, zoom and display your own images.
Also take note that for commercial application I beleive you might need to license it.
Google maps support having different tiles (the map picture) under them. So if you can get a map of 1800 then you can show it in the map (but probably you would need a high resolution map).
And so on.
We started using Google Maps on our web application rather extensively. It worked fine at the beginning, but as we add more markers we find that the performance are not quite there. Although I'm quite sure we don't use it in the most efficient way.
I am looking for information about Google Maps best practices and tips'n tricks. Any suggestions?
You might find some good ideas in this article, which compares several methods of handling large amounts of markers.
Marker Manager has some limitations, depending on what you're trying to accomplish; for instance, it doesn't allow every marker to be available from every zoom level. I created a clustering function based on the principles discussed in this tutorial. It uses the Static Maps API in PHP, but the principles behind the clustering can be used however you want.
Update: This clustering utility was just released: MarkerClusterer
Use Marker Manager.
Limit markers to what's visible (ie, understand the window boundaries, and only show markers that fall inside the window)
Learn to listen for various map activities and react - such as viewpoint moves, zooming, etc - to update the markers
Don't show markers that overlap significantly - show only one marker (perhaps a different shade or color to denote there are several points at this marker) and let the user zoom in if they want to see the individual markers. Use the tooltip to show a zoomed in window if you want to get fancy.
I am trying to build a Google Maps-driven web application that can display a map of the whole world in one or all of the following configurations:
A continent-outline map, only differentiating between land and water (like this, but without the country borders/names, and without showing any additional detail as you zoom in)
A physical geography map of the world, containing absolutely no road, city, or political borders (so the default satellite map is out - if I can't get anything else working, I'm considering just restricting the zoom-level such that you can't get in close enough to see modern features)
The same kind of old-world maps shown here and here for Google Earth.
A similar effect to what I'm after can be achieved with the old maps from the Rumsey Collection (q.v.), which are excellent but rather bandwidth-intensive and slow down the GMaps performance significantly. Simpler, less detailed images would better suit my purposes.
Is there an efficient way to load those world-spanning KMZ graphical files from bullet 3 as tilesets?
How about the physical or silhouette-based map? If necessary, one could follow the GMaps guideline for carving out .png files to represent each tile if there exists a freely available starting map.
You can also use open-source MapTiler application - http://www.maptiler.org/ or the command line utility gdal2tiles.
Here is a tutorial on building custom tiled maps:
http://webtide.wordpress.com/2008/08/27/custom-google-maps/
This appears to be a service for creating custom tiled maps:
http://www.maplib.net/
Good luck!