Comments (2)
Yup, from what I can tell it's a how-variables-are-handled thing. When you're getting "None" from dataTwo
, you're getting the string "None"
instead of the variable None
. When you replace the word dataTwo
with the word None
you're getting the variable None
, and that's why it works!
A workaround could be to define all of your icons like this...
var icons = {
'None': L.icon({
iconUrl: 'icons/shadow.jpg',
iconSize: [10,10]}),
'Red': L.icon({
iconUrl: 'icons/red.jpg',
iconSize: [10,10]}),
'Purple': L.icon({
iconUrl: 'icons/purple.jpg',
iconSize: [10,10]}),
}
And then instead of layer = new L.Marker(marker_location, {icon: dataTwo});
you'd use
layer = new L.Marker(marker_location, {icon: icons[dataTwo]});
...which ends up being the same as pulling icons["None"]
. I'm going to go ahead and close this since it isn't a Tabletop issue, but if you're still running into issues feel free to drop me your code at [email protected] and I'll take a look!
from tabletop.
Thank you immensely! This is exactly what I needed. I'm a bit new to javascript so the thought to drop it in an array and call it that way didn't even occur to me. Thanks for what you've done with tabletop as well!
from tabletop.
Related Issues (20)
- How do I access the data in a specific sheet? HOT 1
- Spreadsheet with 2 sheets seems to randomly display one or the other HOT 1
- Is this still maintained? HOT 1
- Is there any way to make sub properties of the JSON objects? HOT 1
- Objects are columns, not rows HOT 2
- Unable to use postProcess with beforeReady
- Use with Webpack and other asset bundlers creates a bloated package HOT 3
- TypeError: undefined is not a function (near '...}).then(function (data, tab...') HOT 1
- compatibility with bootstrap.js/popper?
- stops at empty rows HOT 1
- Trouble accessing specific sheet data HOT 2
- error while putting sheet url HOT 2
- Cannot read property 'length' of undefined or CORS HOT 2
- Google sheets data export only for paid version? HOT 2
- Question: is there a way to save to a spreadsheet using tabletop? HOT 1
- Tabletop becoming obsolete :-( HOT 10
- The new PapaParse solution yields "No 'Access-Control-Allow-Origin' header" error HOT 17
- ¡Thanks Tabletop!
- Is tabletop still dying? HOT 18
- 404 on the Google sheet feeds HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tabletop.