question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How do I make the locate button bigger?

See original GitHub issue

I’m trying to use this on mobile, and I find the locate icon to be a bit small. Is there a way to make the button + icon bigger through the options. Could this be added to the FAQ?

I’ve added the following to the leaflet-bar-part style but it’s not centering well for some reason.

"height: 1.5em; width: 1.5em;font-size: large;vertical-align: center; text-align: center"

I also changed the icon to be crosshairs with L.control.locate({icon: 'fa fa-crosshairs'})

Result in Firefox on Ubuntu

selection_024

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
kaio328commented, Feb 13, 2017

I figured out what it was! Had a CSS data implemented called ‘mobile.css’. It contains some stylesheets about leaflet control for mobile usage. After removing this file my button can be optimized as you showed above. Thanks anyways!

2reactions
kaio328commented, Feb 7, 2017

I also got problem with styling the button…

.leaflet-control-locate.active a {
}

and

.leaflet-control-locate.active.following a {
}

is simple. But i really struggle with

 .leaflet-control-locate a {
}

I cant change anything : Color, border and even the size. Any hints?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to set the size of button in HTML - Stack Overflow
I have some buttons on my pure HTML/JS page. When the page is opened in browser, the button size is normal. But on...
Read more >
Adjust map settings in Find My on iPhone - Apple Support
Tap the button at the top right. · Choose another map type. You can also tap the More button to further customize the...
Read more >
Locate button | ArcGIS Maps SDK for JavaScript 4.25
Find and zoom to the user's current location using the Locate button widget. This widget uses the HTML5 Geolocation API to find the...
Read more >
How To Make Roblox Controls Bigger on IOS (iPhone / iPad)
Easy to follow tutorial on making the control buttons on Roblox Mobile bigger on IOS devices! Is your jump button too small on...
Read more >
Customize the Quick Access Toolbar - Microsoft Support
You can set the location commands in Options. · Select File > Options > Quick Access Toolbar>Toolbar Position.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found