I am using google maps 3 api and am changing the icon of a marker when it is clicked. I am also registered for mouseover and mouseout events on the marker. I am finding that when the icon is changed because it has been clicked, it triggers a mouseout and then a mouseover. Is there a way to prevent these extra events from triggering?
edit: I'm changing the icon with the following code:
marker.setIcon(selecticon);
Thanks
How are you changing the icon? Are you sure you are not destroying the marker, and then recreating it.
We have no way of knowing because you haveing let us see your code (please include a link)
Related
I am trying to do change the color of a button when a user clicks on it, but I have no idea how the click events nor css work in the world of GTK3 Rust. Google searches are not fruitful.
This is the button:
let transmission_button = button::create_text_button(self, "transmission_button", "Transmission");
previous_box.add(&transmission_button);
I know a connect_clicked() method exists, but I have seen zero examples on how to use it for events where the color of a button clicked changes.
So I am having this issue with using Google VR reticle where I cannot click a button. I have an image attached showing the heirarchy and the PlayButton is what I am trying to click. The Canvas has a Graphic Raycaster, the button has an Event Trigger that calls the method to navigate to the next scene. The UpScrollPanel, and DownScrollPanel work just fine. The EventSystem has the Gaze Input Module, as well as Event System, and Touch Input Module.
Any ideas on how to get this working? I have watched a few videos from NurFACEGAMES and while they helped a little, I haven't gotten the click to work yet.
Oh, and I am using Unity 5.3.4f
Sometimes things can get in the way of the button, make sure that no other UI elements overlap it, for example text borders (which are actually larger than they appear). You can also fix this by moving the button up the hierarchy among its siblings, I believe the first child is top.
Also try moving the button up the hierarchy if possible, sometimes UI having certain parents makes them not work
The canvas object should have a graphic raycaster
I found the issue to be unrelated to anything I thought it was. The menu I was using is a prefab I also use in another view that isn't VR. The scrollrect was loading that prefab, instead of the modified one I was using in the VR menu, and therefore the triggers I had added to the button were no being used when the app loaded.
I'm using this third party library, called Marker Clusterer with the Google Maps API. http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/docs/reference.html
I am trying to trigger an event when the map's zoom level is changed. The odd thing I've noticed though, is that when you click on a marker cluster, it calls the zoom event twice. Has anyone come across this odd error before? Why would it trigger the zoom callback twice? When I zoom normally without using clusters, the zoom callback is only called once.
Any ideas?
Looks like that behavior is a fix for an issue on IOS. You can download your own copy of the code and remove the additional call to fitBounds if you don't need it.
I have an accordion widget with 2 tabs. Each of them has a GoogleMap. The first map get properly displayed but when I open the second one, only a portion of the map appears in the viewport.
If I remove the widget by commenting out the following code, both maps are properly displayed.
$("#accordion").accordion({
header: "h3", fillSpace: true, event: "mouseover"
});
How can I use this widget while still having both map displayed properly?
Check on http://forums.asp.net/t/1780781.aspx/1?using+jquery+accordion+hides+most+of+googleMap to get the code as it is quite a job to publish it on this site.
thanks a lot!
You'll need to observe the change-event of the accordion and trigger the resize-event for the map when it fires.
Example: http://jsfiddle.net/doktormolle/VqzPE/
The example stores the map inside the data of the accordion-content, so you may easy access it when change fires.
I would like to personalize the position badge on a Google Map (with API). I know it's possible to change the appeareance of the badge with CSS or image. But how I can do that ?
This is what I want :
The small rectangle is the normal view, and the big rectangle is the clicked view (with informations). Thanks !!!
The 'big rectangle' and 'small rectangle' are both infowindows. Styling infowindows has been asked here before:
Styling Google Maps InfoWindow
You'd need to have an event listener, so initially the small infowindows are all displayed on load. Then when you click on a point or on an infowindow, you then show the large infowindow.