-
Notifications
You must be signed in to change notification settings - Fork 31
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
Custom Controls #6
Comments
Yes, possible. That's why JS developers use this plugin. |
For example, <div class="map" id="map_canvas1">
<button ion-button (click)="onButton1_click($event)" >Click here</button></span>
</div> |
But you don't need to put the element inside the map div tag. |
So instead of // Create the DIV to hold the control and call the CenterControl()
// constructor passing in this DIV.
var centerControlDiv = document.createElement('div');
var centerControl = new CenterControl(centerControlDiv, map);
centerControlDiv.index = 1;
map.controls[google.maps.ControlPosition.TOP_CENTER].push(centerControlDiv); I just add a div and reference that div in the code like this var centerControlDiv = document.getElementById('mapcustomdiv');
var centerControl = new CenterControl(centerControlDiv, map);
centerControlDiv.index = 1; I know this could be done with styling, but just as an example of overlaying the map with custom html |
Is it possible using this plugin to add a custom control, like described in https://developers.google.com/maps/documentation/javascript/examples/control-custom
The text was updated successfully, but these errors were encountered: