Google Maps: InfoWindow vs InfoBox vs InfoBubble - google-maps

InfoWindow is a standard part of the Google Maps API v3, allowing the user to create a pop-up window on a map, but there's also two other libraries that seem to do the same thing:
InfoBox
InfoBubble
I understand that these two most likely offer more customization options than the original InfoWindow, but are there any other differences? Are they competitors or do they do different jobs? Is one more up-to-date than the other?

While InfoWindow is the built-in object of the Google Maps JavaScript API, InfoBox and InfoBubble are "third-party" objects of the InfoWindow, which extend it. Because of this the two are located in the utility-library.
So they are doing the same job, but are more enhanced concerning customizations. The InfoBubble seems to be better documented and maintained. The InfoBox library is also not mentioned on the Google Maps Github site anymore. So if you have to make the choice I would go for InfoBubble instead of InfoBox (if you need more options compared to the standard InfoWindow).

Related

Creating Polygon using Google Map API

I am referring the URL : https://housing.com/in/buy/search?f=eyJiYXNlIjpbeyJ0eXBlIjoiUE9MWSIsInV1aWQiOiJmMGZhNTIwNjI0ZjNhOGRlOWY4NSIsImxhYmVsIjoiUGltcGxlIFNhdWRhZ2FyIn1dLCJ2IjoyLCJzIjoiZCJ9
I am trying to make something similar, can anybody suggest how can I achieve it. I tried to search and explore google map APIs, but could not understand which API in particular can be used.
Try to read the Google Maps Showcase. Millions of apps and sites are using Google Maps APIs. Browse the showcase to see some of our favorite implementations.
You can use the MarkerClusterer library in combination with the Google Maps JavaScript API to combine markers of close proximity into clusters, and simplify the display of markers on the map.
Here's a sample project for MarkerCluster: https://github.com/googlemaps/v3-utility-library/tree/master/markerclusterer
Polygon is one feature of Drawing tools of Google Maps. The DrawingManager class provides a graphical interface for users to draw polygons, rectangles, polylines, circles, and markers on the map.
The Drawing Tools are a self-contained library, separate from the main Maps API JavaScript code. To use the functionality contained within this library, you must first load it using the libraries parameter in the Maps API bootstrap URL:
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=drawing">
</script>
Once you’ve added the libraries parameter, you can create a DrawingManager object as follows:
var drawingManager = new google.maps.drawing.DrawingManager();
drawingManager.setMap(map);
Reference: https://developers.google.com/maps/documentation/javascript/examples/drawing-tools

How to add a business/"default" location marker and infoWindow to Google Maps (v3)

Is is possible to add a business location marker WITH IT'S "DEFAULT" INFOWINDOW bubble like the ones in maps.google.com?
I'm making a contact page for a a company, where I have the GMaps element with a location and a marker, naturally.
Example:
Go to maps.google.com and search for "Colosseum" (for example, any "known" location/business will do). When you click the Colosseum marker, you get an infoWindow that has the business/sight/whatever info in the window (screenshot: https://dl.dropbox.com/u/1122582/colosseum.jpg)
What I want to see, is:
When I click the marker on my map on my webpage, it will open the same style (or atleast very similar) infoWindow as in the example (this means logo, address, direction links etc. whatever it has). InfoWindow being provided by the API options, and not handmade by me.
In pseudocode, I would imagine seeing it like this:
myMarker.onClick({
position: myBusinessLocation,
useDefaultInfoWindow: true
map: myMap
});
Worth noting that since coordinates are actually just coordinates and named locations, I would need to make the API understand the Marker points to a business, and not just a point in the map.
Requirements
Client-side API usage
WITHOUT the use of Google's IFRAME embedding
WITHOUT making a custom infoWindow that just looks like the one in the example. The whole point is that I would use the "default" infoWindow (if GMaps API even provides one)
There is no built-in method to create such an infoWindow with the desired content automatically.
That's the nature of an API, it has to offer the ability to create an application, but must not create an application automatically.
You have to create the infoWindow on your own by using e.g. the implemented infoWindow-object.
The contents of the infoWindow you also must collect on your own, you may retrieve the details for a place by using a Place-Details-Request

google map: group pins to one pin after zoom out

Google map script has feature if zoom is 'big' it groups all pins to the one pin(circle with number of pins, here is example http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/examples/advanced_example.html). How to call this feature on my side? I bring the javascript code which I use to display my map http://jsfiddle.net/LUuwB/ (check javascript section, it is not working there but it is example how I use it).
Thanks
This is not a GoogleMap Features. It's thirdparty scripts devlopped by users.
You have to go on the Wiki section http://code.google.com/p/google-maps-utility-library-v3/wiki/Libraries to download the released version, with samples and docs.
It's not hard to use.

JavaME LWUIT: is there appropriate map lib?

I am developing JavaME LWUIT application which needs to display some data on map.
And I'd like to use Google Maps for this.
I thought about the requirements to the maps and their user interface. They are
listed below:
Pannable map. It should be possible to scroll the map using the touch interface or navigation arrow buttions which are displayed on the map.
Zoomable map. At the best, there should be appropriate +/- buttons displayed on the map.
Search location by address and move to it (menu command).
Remember the last visited location.
Marker for the current location.
Markers with customable icon and text which is displayed when select the marker (click on it or select somehow).
I spent some time searching for appropriate Map Library for JavaME/LWUIT.
I expected to find a free library and map service (ha-ha).
See my results below:
MIDMaps library. URL: http://www.jappit.com/blog/midmaps-google-maps-java-me-library/
That library uses the Google Static Map Service. Not bad... but it needs a lot further improvements...
I found the follwoing issues with that library:
Markers: impossible to customize marker's icon and text. Displaying the marker's text on click/selection is not supported.
Map Panning: no UI controls for this (arrow buttons). Doing panning with menu commands is not a user-friendly.
Map Zooming: no UI controls for this (+/- buttons). Not so important...
License: not permitted to use in a mobile app if not a Google Premier User. Not a problem...
Nokia Maps API for JavaME. URL: http://www.developer.nokia.com/Develop/Maps/Maps_API_for_Java_ME/
Did not try. But looks like that lib fulfills all my requirements.
I am not sure about the following things:
Quality of the maps.
How much does it cost? I mean the cost of using the map service.
Nutiteq lib which uses OpenStreetMap service. URL: http://www.nutiteq.com/map-api
Not free the lib, but the map service.
Guidebee Map API. URL: http://www.guidebee.biz/
It's not free.
Now it's a time for me to ask questions. What should I do? Are there any advices?
Maybe I missed some possibilities or lib/services?
Thank you for your help!
See the Makeover demo in SVN (I updated it to use Google maps instead of Yahoo maps API which was killed off). The GoogleService API should be available in the SVN history it was (deleted because of licensing nonsense) within the IO services directory and it includes local search etc.
Terrence has a a demo that includes allot of interesting features including a browseable map.
You can also look at Waze although I haven't checked it myself, I saw people using open street map and AFAIK there is an open source mapping application based on that (although the license might not be appropriate for you but it might still be useful as a learning aid).
After some additional investigations I decided to use Nokia Maps. And now I have a working application which displays interactive map with my data markers on it and also my current location.
I chose Nokia Maps API because it provided real dynamic maps (panning, zooming, tiling) and fulfilled all my requirements, except "Remember the last visited location" (can be implemented on my own).
I met the following problems:
Using the maps from LWUIT, not from an ordinary MIDP application. I used the approach shown here Nutiteq SDK with LWUIT and also implemented my own MapWidget class for LWUIT.
Displaying additional info on marker click. There is no support for this in the lib. I had to implement it on my own. Details are here JavaME Nokia Maps API: how to display additional info on marker click
Additional info related to the choosing proper map library can be found here Discussion on Nokia Forum

InfoWindow replacement for Google Maps v3

I'm looking for an InfoWindow replacement for Google Maps v3. I want to use it for popping up on marker mouseover. The standard InfoWindow is wholly unusable because it pans and makes itself a nuisance. Google Maps v2 had the excellent GxMarker (doesn't work with the new API): http://code.toeat.com/gxmarker.html
Does anyone know of a similar plugin for Google Maps v3, or other ways to work around the bossy behaviour of InfoWindow?
In the InfoWindow options you can disable the panning by setting disableAutoPan to be true, you can read more on the reference page.
But there is also a InfoBox utility library that can be found here
http://econym.org.uk/gmap/ebubble.htm was what I used for V2 and when you glance at the code you can see it's fairly simply and may work with V3 if altered slightly.
Hope it helps.
var infowindow2 = new google.maps.InfoWindow({
disableAutoPan: true
});