-
Notifications
You must be signed in to change notification settings - Fork 918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Marker or image always on center #41
Comments
You can not put any images or buttons over the map, because the map places above the web view (HTML layer). I have been considering this feature request, but not find any better way. |
@wf9a5m75 Could you please try and find a way to do this? I think it's a common feature that will be requested by many users. For example, in my application I need to be able to add a custom control that functions in its own way. With the Google Maps JavaScript API I could do this simply by creating an absolute element, positioning it above the map canvas, and then adding an event handler to the element. I think this is something that needs to be possible in the plugin, or at least a way to add custom controls. I have a sidebar in my application and when I try to move the Without this sort of functionality every app that uses the plugin is restricted to a single screen. Really we need the application to sit inside of the div so it can be moved around like you would expect. |
@jskidd3 |
I'd like to see something similar. Ideally, I want a marker always positioned in the center of the map (i.e. what the Uber app does). Right now, I move the marker when the camera moves, but it feels odd since the marker doesn't move while the map is dragging. What about doing something like: Thanks! |
This is implemented in v1.2.0. V1.2.0 is going to release in September. |
Please try the new version of the plugin. |
Is this documented, I am using plugin v1.2.5, but I unable to find how to implement this? |
Hey ! |
Using the plugin v2, you should be able to do with this: map.on(plugin.google.maps.event.CAMERA_MOVE, function(cameraPosition) {
marker.setPosition(cameraPosition.target);
}); |
Hey Masashi, |
Or put an image in the map div. <div id="map" style="position: relative">
<img src="marker.img" style="position: absolute; left:50%;top:50%;" />
</div> |
Hello Masahi, I have used your fix and it has been working perfectly. However, multiple users have alerted me about a problem. When elements are overlayed on top of the map, dragging those elements causes the map to scroll. The detail of the bug can be found here : Would anyone know if there's a way to prevent that from happening ? Thank you very much. |
How about this?
|
Drag map while keeping marker at the center |
Hi, i need to put a image over the map in order to keep it always in the center at the map. Also i need to set a button over the map. How can i do that?
The text was updated successfully, but these errors were encountered: