0

I'm new to D3. I'm trying to figure out how to add an address search to a map using a mercator projection and vector tiles. I'm using Open Street Map's nominatim search. The search itself is working just fine. What I need help with is, on clicking the result of a search, I want to zoom in to the new coordinate on my map.

Here is a block where the zoom/pan is working except nothing is set up for the onclick on search result:

http://bl.ocks.org/jhubley/fec6ef3b79efcd85caca

And I'm not sure if this is helpful, but here's another block, where when you click on the result of a search, it does jump to the right location. However as you can see the coordinates aren't correct, and the free zoom/pan at any location is a mess.

http://bl.ocks.org/jhubley/c4300b163b0959b45a31

Any feedback or thoughts would be really greatly appreciated. Thanks! Jill

  • 1
    Have you seen [this question](http://stackoverflow.com/questions/14492284/center-a-map-in-d3-given-a-geojson-object)? The same applies if you want to do it for a point. – Lars Kotthoff Jan 17 '15 at 20:31
  • @LarsKotthoff I didn't come across that question in my search earlier. Thanks so much- it really helps. – beetlejuice Jan 18 '15 at 04:48

0 Answers0