I’ve been looking at the api and you may do the following:
Create a GoogleMapControl and add it to the map using addControl. Attach a listener to your map: when clicking + icon increment the zoom, do stuff and call to setZoom. The same thing if the user clicks -.
I’ve got a huge question relating maps addon for Vaadin. I’m not able of removing (or hiding) markers nor polylines. Removing polylines result impossible to me. Markers are removed little by little, click by click (considering a button which removes ALL the markers).
To remove a polygon, I’ve used
To remove markers, I’ve used both clearMarkers() (single line) and the following code:
for(GoogleMapMarker m : map.getMarkers()){
map.removeMarker(m);
}
Well, i am aware that i can use polygons but that must be terrible to calculate tens of coordinates in order to build a circle. I was thinking of sth simple as it is on the mobile versions of the APIs.
Hi
I have a feature that consist of adding/removing multiple markers from the map once and it works fine with vaadin 7.3.10.
After upgrading to vaadin 7.4.2 this feature does not work anymore. When trying to remove the set of markers using the method clearMarkers(), only 1 markers is removed.
I switched to 7.3.10 and compiled the Widgetset → Removing more than one marker at a time works.
Switched back to 7.4.3 while keeping the old Widgetset → still works.
Compiling a 7.4.3 Widgetset → Bugged…
After clearMarkers() they are removed on the server but only the first marker on the client is removed.
Calling clearMarkers() again does nothing (even if it happens in another buttonclick).
Clicking on those bugged markers result in clickedMarker == null inside the MarkerClickListener.
It seems to be some kind of bug in new Vaadin version that broke clearMarkers method. Anyway, I’ve created a fixed version. Google Maps add-on version 1.0.2 is already out. Please test it and report if you notice any new problems.
Since there have been some requests that there should be an example Eclipse project having all the required dependencies, I’ve added the project mentioned in earlier post - googlemaps-clearmarkers-test - to GitHub.
You can use it as a starting point if you’re having problems when trying to use the add-on.
Uhh…have they added another requirement for Maps API for Work? At least I haven’t been aware of URL signatures and no-one has requested them before. Quite annoying indeed. Please make a ticket about the issue so that I will more likely remember to add this feature to the next version.
I wasn’t aware of this issue so nothing has been done with polylines. Anyway, in my quick test the polylines seem to work fine. Could you create an example UI that demonstrates the issue?
I’m using Google Maps addon in my application. Our customers accessing my application accross all the country’s. But most of our customers from chaina unable to access google maps portlet. Beacuse google products blocked in china. Is there any alternative way to display maps in chaina…?
they allow yahoo maps and bing maps. can you please provide me any solution for this…?
Hi Tapio,
thanks for this great add-on. I’m going to use version 1.0.2. It’s almost perfect, but I see a minor issue running your demo in Chrome (either from
http://tapio.app.fi/googlemaps/ or compiled on my localhost). If I move the mouse over a draggable marker (“kakolaMarker” in the demo code) a small grey pop-up window appears in the lower left corner of the browser window. It says “javascript:void(0)”. How can I get rid of it?
That’s a feature of the browser and/or Google Maps; clickable markers contain a link that have href element “javascript:void(0)” and the browser is showing what the link containts. That’s something that can’t be circumvented. In case you’re interested in what that particular function call does, I recommend checking out
Stack Overflow .