NateWr / business-profile

WordPress plugin to display your business's contact details with seo-friendly Schema.org markup.
34 stars 16 forks source link

Showing PIN instead of Address in Map #54

Open neilgee opened 8 years ago

neilgee commented 8 years ago

Had a client that not want the default view of the Google map, as the address was already displayed above the map - they instead wanted the PIN that would open to the address when clicked.

Like the one below pin1

and then when the PIN is clicked shows the address pin2-open

I got the functionality needed with MapPress - https://wordpress.org/plugins/mappress-google-maps-for-wordpress/

Was wondering if the map component can be manipulated in Business Profile as it currently stands.

NateWr commented 8 years ago

You can pass options to the map script to use any of Google's map options. However, the info window is generated separately and there's no filter for that.

I'm afraid to accomplish this at the moment you'd need to use the event callback to modify the map after it's been initialized.

I'd definitely like to add this display option to only show a marker instead of an info window, so I'll flag this as a feature request for a future version. I suspect it will get implemented alongside work on #48.

neilgee commented 8 years ago

Ok Nate sounds good, I think the marker is a better way to go as well, especially in terms of UI - and also with the multiple locations going forward.