Comments (4)
added in trunk, though it requires you to set up your own post-processing
functions
to get the returned data into shape.
Original comment by [email protected]
on 27 Apr 2008 at 9:15
- Changed state: Fixed
from timemap.
I got the example on "basic usage" to work. Yea! I also succeeded putting
that
data in a separate file, "basic_data.js", and using <script> to preload the
object
and put it in 'value' (e.g. load a file with var items={...}, then I used value:
[items] in the onLoad). Crude, but a little closer to what I wanted.
I gather from looking through timemap.js, that I should be able to do this by
type:"json", url:"basic_data.js", but this doesn't work. Ideas? Is this
related
to "set up your own post-processing", or some other newbie mistake?
Original comment by [email protected]
on 16 Sep 2008 at 1:41
from timemap.
I hope to add a wiki page detailing this soon, but here's the quick rundown:
- If you're using your own static data, it's perfectly fine to do exactly what
you
did: load your data manually into a variable, use the "basic" type and set the
value
to the name of your variable (though you probably want your variable to be a
array,
e.g. items = [{...item 1 data...}, {...item 2 data...}]). The effect is exactly
the
same as using the JSON loader.
- The main point of the JSON loader is if you're loading data from someone
else's
service - for example, exporting events from a Google Calendar or a Google
Spreadsheet. These services often work by creating the data on the fly in JSON
format; rather than assigning the data to a variable, though, they use it as the
argument for a callback function with a name you provide. This is what the JSON
loader helps with - if you give it the URL of the JSON-providing service,
leaving off
the name of the callback function (e.g.
"http://www.example.com/somedata.php?mycallbackfunction="), the JSON loader will
create a function name and handle the data once it's returned.
So while it's possible to use the JSON loader in the way that you'd like, by
spoofing
the callback function (not worth going into the details here), it's actually
much
simpler and easier, if you control the data, to just do what you did, load it
into a
variable and use the "basic" loading mechanism. This is actually more stable as
well,
because you don't have to deal with any asynchronous loading procedure, as the
data
is already loaded when you set it to TimeMap.
hope that helps -
Original comment by [email protected]
on 16 Sep 2008 at 4:15
from timemap.
Cool, I understand the thinking more. That is a great help!
Original comment by [email protected]
on 16 Sep 2008 at 4:41
from timemap.
Related Issues (20)
- Firefox throws an error in Google Maps v3 marker render HOT 1
- Update and test latest jQuery HOT 2
- Make TimeMapItem.getInfoHtml() HOT 2
- mapCenter and mapZoom options cannot be set as options before Mapstraction is initialised. HOT 1
- Progressive item themes HOT 1
- Projection problem in OpenLayers HOT 1
- ExtendedData in KML doesn't work in IE9 HOT 1
- Empty polygon breaks KML parse
- Installing google earth plugin from this site crashed my system. HOT 5
- Progressive loader won't load earlier dates
- Progressive loader duplicates duration events that cross time blocks
- Handling data from a Google Spreadsheet when data isn't on first sheet HOT 1
- One Timeline for two maps HOT 1
- Allow scrollToDate() to take a callback
- Timeline not working in Chrome, Firefox (google_spreadsheet.html) HOT 2
- Events with no geo info should use default balloon HOT 1
- config option to disable map.autoCenterAndZoom() HOT 1
- Space on page address path breaks the library
- mxn.googlev3.core.js: navigationControl should be changed to zoomControl/panControl
- TimeMap.loaders.gss and the new GoogleDrive dont fit together?
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 timemap.