Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using personal SVG map #160

Open
Guillaume84 opened this issue Jul 4, 2014 · 1 comment
Open

Using personal SVG map #160

Guillaume84 opened this issue Jul 4, 2014 · 1 comment

Comments

@Guillaume84
Copy link

Hello,

Hope this finds you well. I am amazed and very impressed by this script and had a quick question.

It looks like all the examples on your page are using the Mapquest open tile set. I envisage a much leaner interface for my project, and was in fact hoping to use a simple 'political' map which just shows national boundaries. In addition to this, I would like the map to still display the cities (and your awesome label placement algo), some features (e.g. rivers, lakes) but no roads, etc.

Is it therefore possible to overlay all these 'layers' (cities, lakes, roads, etc.) on top of a custom built SVG map? Please let me know if there is a way to achieve this and many thanks for your time!

Kind regards,
G BdeJ

@ryanttb
Copy link
Contributor

ryanttb commented Aug 11, 2014

Sorry for the delay, had accidentally unwatched my own project!

The answer depends on what exactly you mean by "custom built SVG map." The features will only liny up of everything's in the same coordinate system. If they are, there's no reason you can't put the SVG map inside the jQuery Geo map...though make sure you disable panning & zooming. HTML could look something like this:

<div id="geomap" style="height: 480px;">
  <svg id="svgmap" style="position: absolute; left: 0; top: 0; witdth: 100%; height: 100%;"></svg>
</div>

Though, to be honest, I don't have too much experience with SVG. Another thought is to parse the SVG with JavaScript as XML & append them to the geomap as shapes.

If you want the map to be pannable, it will be even more complicated and I would have to see an example of the SVG map you're trying to work with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants