Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
I'm working with the GoogleMap widget, and have found that when my data has locations specified around the world, the Map is zoomed out almost fully, and is centered on the pacific ocean, which is not particularly interesting.
I'd like to be able to center the currently selected location on the map. Specifying a Selected Location of 0,0 does not center the map at 0,0; it just puts the selected location marker at 0,0.
The Boundary bindings are strictly source bindings and will not work as a target, so I can't specify four corners manually / programmatically.
Does anyone know a way that I can adjust the centering of the map and possibly the Zoom level at the same time?
Solved! Go to Solution.
Jeremy, what is your current setting for the AutoZoomBehavior? You can set it to 'AutoZoom only when the AutoZoom widget service is invoked' for the Map to not zoom out and show all locations unless invoked.
Jeremy, what is your current setting for the AutoZoomBehavior? You can set it to 'AutoZoom only when the AutoZoom widget service is invoked' for the Map to not zoom out and show all locations unless invoked.
I've changed the AutoZoomBehaviour to "AutoZoom only when service is invoked" and now see the selected location is the center of the map on Mashup load. Thanks for that.
My next question would be whether or not it's possible to get the map to center on the currently selected marker when selection changes. Tying the Google Map Widget's Changed event to the AutoZoom service does nothing, and there don't appear to be any other services that could allow me to do this.
I don't believe there is any way to auto zoom to the selected marker. One way to 'simulate' this would be is by using a TooltipMashup. In this case, if you hover over your selection marker, it map would automatically center on that marker (but display the Mashup you've bound in the ToolipMashupName property too).
There's a way to do that. Try to bind the Query (or Service) / Selected Row(s) to GoogleMap / Selected Location. The map then will jump to the selected marker / location.
Hi
I dint understand how to do auto zoom in the Google map binded with the slected location in the mashup. Can anyone help me out?
Hi, did u bind the query Selected Row like my previous post ? Do you mean auto jump, or auto zoom ?
Hi,
Thankyou for your reply.
I want Auto zoom.
I have google map widget which is binded to Location property of the thing i created. The marker in the google map service seems to be pointing to the city of the place i give.But for getting the correct place, i have to zoom in alot.
Hi,
You said u had to zoom in, that means there's the marker on the map, on the right location and the location is just too small ?
Hi,
Marker shows the location, but its not getting zoomed.
Also i have another doubt. Is it possible to mark more than one position in a google map in the mashup
For eg: I have multiple things with location property. I want to show the location of all these things in a single google map at the same time. Is that possible? if so how can it be done?
If the marker shows the location and if the marker is centered on the map, it's fine I think. The GoogleMap widget has properties Zoom and AutoZoomBehavior. You can try to change some values to get a zoom level wanted.
It's possible to mark all the locations. The one selected will be marked with a blue icon and the others with a white icon. You can bind "All Data" of the query service to the "Data" of GoogleMap widget. Then, in the LocationField property of the GoogleMap, you chose the location field.
Hi
Thank you for the reply..
but i dint understand the google map multiple location set clearly.if possible can u show me with screenshots or steps?