I’ve just released version 0.6 that adds support for both info windows and icons of the markers.
Current implementation doesn’t modify the marker objects when they have been dragged. The listener just gets the new position as the second parameter and it’s up to the user to update the markers if that kind of action is wanted.
Nice addon. Thanks for window info and customized markers.
I need some other google apis service. Like geocode, distancematrix and route calculations. Is it possible call those services thru GoogleMaps api (in future or now?) or should i do other connections (own request) to google?
VaadinService.getBaseDirectory().getAbsolutePath() gives you the absolute path to the directory of you application in your file system while here an URL to the icon is wanted. Most of the time it should be enough to use just
HI Tapio! Using the add-on I found out that the setCenter() method doesn’t always work, the use case is : I have a list of “things” and I want to show their location on map when I select them from a table, but whenever I try to select it and invoke setCenter, the map isn’t centered automatically. Can you help please ?
We have several sponsors to thank for this add-on. Please contact sales@vaadin.com if you would like to discuss sponsoring those or some other features into a future version of the add-on.
The case is that i have a textfield ‘search’ and a button, that i user to take address as input. Than i use geocoding to translate the address to a LatLon object, than as you see at the code on the listener, i call map.setCenter(latLon) and then add a marker. The first time the setCenter works and the marker is added, but the next times setCenter doesn’t work but the marker is added anyway.
Hi Tapio,
First of all. Great job to all of you !!!
I have noticed the same Issue as Ivan mentioned above. If I move away from a given point, or scroll the Map and invoke setCenter on a particular coordinate, the Map doesn’t seem to get centered.
I noticed however that if I place a Marker at the “target center position”, the marker is appearing at the right place so the issue, at least in my case, is really centering.
I was looking for an issue, where I put the map inside a VerticalSplitPanel, and if I resize the split panel, the map won’t draw correctly the background tiles.
Than I found this in the Google Maps documentation:
…“Developers should trigger this event on the map when the div changes size: google.maps.event.trigger(map, ‘resize’) .”
Hi,
I have this warning in my eclipse console after few second that my map is loaded:
3-set-2013 12.04.43 com.vaadin.server.communication.ServerRpcHandler parseInvocation
AVVERTENZA: RPC call to com.vaadin.tapio.googlemaps.client.GoogleMapMovedRpc.mapMoved received for connector 100 but no such connector could be found. Resynchronizing client.
Hi Tappio! Hope everything is fine. I’ve experimenting with your plugin and it seems very good. Tell me one thing - do you think it’s possible to change the map Locale ? Right now all my Application is in English but the top and left corners present information in Portuguese and I think it’s because I am not setting the locale properly.
I’ll take a look on these and hopefully both will be in the next version.
Hard to know what causes the RPC call to fail without knowing anything else about your environment. Probably this isn’t an issue if you’re receiving other map moved events without problems.
As told
in the API documentation , the language used by maps is, by default, chosen from the preferred languages of the browser. I guess I could add a setting for this too.
I tried this, but doing draggedMarker.setPosition(newPosition) from the MarkerDragListener does not seem to update the map with the new position it seems - e.g. adding a new marker afterwards brings the dragged one back to the previous position.
I had to explicitly remove the marker and add a new one with the new position, which of course triggers a new animation for every marker in the map (if that’s enabled), which is quite slow/confusing as the response to a simple dragging operation, especially as the number of markers grows.
Is there a way to overcome this? How do you recommend to perform the position update of a marker in the listener?