Comments (19)
agreed. Currently it's "whole world" or "just USA". I want to add different zoom levels to different continents.
So maybe:
$("#map").datamaps({ zoom: 'SouthAmerica' });
Which would essential be a World map but zoomed in on the center of South America.
You think that would be enough?
from datamaps.
Is there a way to buil your js coordinates starting from gps one?
from datamaps.
You can now specify scopes such as:
- southAmerica
- middleEast
- africa
- europe
- asia
- southeastAsia
- australia
- world
- usa
with the latest version.
after commit: 5f9ca3b
from datamaps.
example at http://datamaps.github.com/#scopes
from datamaps.
Great work indeed.
from datamaps.
Is this no longer supported in the newest version? It's working fine for scope world and usa, but for other scopes I get this error:
[03:27:49.989] TypeError: a is undefined @ http://localhost:8888/datamaps/datamaps.all.min.js:1
from datamaps.
Hi there,
zoom
doesn't appear to be supported anymore?
I'd like to "zoom" in on Africa only.
Will I need to get custom map data or is there some way that is supported out the box?
from datamaps.
Never mind, I've just seen the "zoom" branch.
Will give it another attempt.
from datamaps.
@kylemclaren: you don't need custom map data, but you probably want to take advantage of a custom projection.
For Africa, it'd look something like this:
http://jsbin.com/EjOHuliN/2/edit
You can mess with the scale, center and translation to move it into place.
The zoom branch is outdated, I changed my approach to zooming by exposing more d3 instead of abstracting it (as in, allowing you to specify your projection and all the options).
from datamaps.
@markmarkoh Brilliant! Thanks for the quick reply. Let me see what I can make happen...
from datamaps.
Hey, how would I get a map centered on Europe?
from datamaps.
@ivdekov change your projection to europe:
var projection = d3.geo.equirectangular()
.center([10, 50])
.rotate([4.4, 0])
.scale(1500)
.translate([element.offsetWidth / 2, element.offsetHeight / 2]);
var path = d3.geo.path()
.projection(projection);
from datamaps.
Hi All, this is an awesome library and I am using custom map feature of it. I have Senegal Topojson and its not showing in the visual area. I guess I need to set projection correctly, but I am not getting anywhere near to find the values for scale,translate and center. Is there any method to find the values of scale and translate. Thanks
from datamaps.
Sorry for the necropost(?), but it appears the additional scopes are not working:
Uncaught TypeError: Cannot read property 'objects' of undefined
from datamaps.
@markmarkoh
Really appreciated the work you guys have done. But the datamap only supports for World and USA map and no other countries. But I need to use Canada, Brazil maps.
Can you help me how to use the maps of other countries or give me some idea about the map data and rendering, so that I can fix it.
Thanks!
from datamaps.
By doing some brain storming in the weekend, able to come up with something. I have created demo files for India, Canada etc which shows bubble map.
https://github.com/Anujarya300/bubble_maps.
Thanks @markmarkoh
from datamaps.
@Anujarya300 that looks really great. I'd love to have that README available in this project, along with those examples. Feel like sending a pull request?
from datamaps.
@markmarkoh, Sure, I'd love to put a pull request.
from datamaps.
I notice all zoom examples use hard-coded coordinates. It would be nice if it was possible to get these coordinates from the continent you're zooming in on. This is possible with countries, but I have no idea if this is also possible with continents. You may have to compare all the bounding boxes of all the countries in that continent, take the min and max of that, and then average the min and max.
from datamaps.
Related Issues (20)
- Some of Countries missing in DataMap HOT 1
- I want to draw lines/paths on india map? Can someone please guide?
- get lat lng somehow from click event
- Missing Nantucket and Marthas Vineyard in Datampas.usa.js HOT 1
- Is it possible to change border colour of specific countries using updateChoropleth?
- Unrecognizable src script HOT 3
- Function to use custom map data HOT 1
- choropleth map color not updating when highlight on hover set to true
- React Native
- Custom-map-data-multi-layer example no longer works
- Text on bubbles
- Part of Russia is coming to the left of America HOT 1
- unable to import datamaps in angular app HOT 2
- How to have 2 maps using the same source, but with different information on hover tooltip? HOT 1
- Zoom to specified latitude and longitude
- Adding datamap to Vue 3
- `animationEnd` and `animationStart` as a configurable option for `map.arcConfig`
- rendering issues in safari 16.3
- Simple installation question
- Map for switzerland (swz?) not working
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 datamaps.