NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum



I am new to osm and i am using mapquest open js sdk, i have done the custom map search using map.nominatimSearchAndAddLocation now i wanted to show the nearest places like hospitals,schools,hotels...etc around the placelike in mapquest . How do i do this? please help me out.

for reference i used this code

<script src=""></script>
<script type="text/javascript" src=""></script>

<script type="text/javascript">

$(document).ready(function() { = new MQA.TileMap( /*constructs an instance of MQA.TileMap*/
document.getElementById('map'), /*ID of element on the page where you want the map added*/
3, /*intial zoom level of the map*/
{lat:12.976418, lng:77.6158}, /*center of map in latitude/longitude */
'map'); /*map type (map)*/
// for zooming control
MQA.withModule('carouselcontrol','shapes','georssdeserializer','remotecollection','smallzoom', function() {
new MQA.SmallZoom(),
new MQA.MapCornerPlacement(MQA.MapCorner.TOP_LEFT, new MQA.Size(5,5))


function search_phase() {
var from = document.getElementById('fromLoc').value;//alert(from);
MQA.withModule('nominatim', function() {

/*Executes a Nominatim search and adds result to the map*/
map.nominatimSearchAndAddLocation(from, null);


<form id="getPOI">
<input type="text" id="fromLoc" name="fromLoc" value="">
<input type="button" value="Search in Map" onClick="search_phase();">

<div id='map' style='width:950px; height:625px;'></div>

asked 01 Jun '12, 09:27

Raj's gravatar image

accept rate: 0%

edited 01 Jun '12, 09:27

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 01 Jun '12, 09:27

question was seen: 4,480 times

last updated: 01 Jun '12, 09:27

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum