Select to view content in your preferred language

keeping search and locate widget  inside map div

799
2
Jump to solution
06-16-2014 10:48 AM
MarcusTownsend
Deactivated User
So I'm using the MAP div as par of a website and not displaying it at full extent of the browser window.

http://jsfiddle.net/644nr/

when I have the search and locate button div inside the map div it bumps the map down and messes with the on click location. (see link)

if I move the divs outside of the map div I can use relative and move them with css but then I have issues making them disappear on a button click.

This is part of a larger project that allows users to filter data based on location on a map. my end goal was to make the map appear on button click after the page loads. 

Just stumped and I'm sure its just something I am over looking... I mean the zoom widget does what I want the other divs to do so it has to be possible.

Any help is appreciated.
0 Kudos
1 Solution

Accepted Solutions
ManishkumarPatel
Deactivated User
Hi Marcus,

Do you mean that you want the locate button on top of the map so if you click that it should not consider it as a map click and instead call the button click function.

Hope this helps.

updated fiddle:
http://jsfiddle.net/patelmanya/644nr/1/


Let me know if there's anything else you need.

Thanks & Regards,
Manish

View solution in original post

0 Kudos
2 Replies
ManishkumarPatel
Deactivated User
Hi Marcus,

Do you mean that you want the locate button on top of the map so if you click that it should not consider it as a map click and instead call the button click function.

Hope this helps.

updated fiddle:
http://jsfiddle.net/patelmanya/644nr/1/


Let me know if there's anything else you need.

Thanks & Regards,
Manish
0 Kudos
MarcusTownsend
Deactivated User
That works. I'm not exactly sure why that worked and the other things I tried didn't.
0 Kudos