My client has an interactive map on their site which uses javascript and css to build the map and style the effects:
http://rockvilletownsquare.com/map
We have a custom field that holds the tenant map location and use javascript to pass that info to the map.
The client would like the map to highlight the tenant on the map if they clicked to the map from a listing on the Restaurants & Cafes page or the Shops & Services page. For example, if you’re viewing Five Guys Famous Burgers and Fries:
http://rockvilletownsquare.com/restaurants-and-cafes/five-guys-famous-burgers-fries
then click on Interactive Map at the lower right they would like Five Guys Burgers and Fries to be highlighted on the map.
I figure I could use document.referrer to get the previously viewed URL. But I’m stuck after that. What would be a good way to convert that last segment in the referring URL to the entry ID? Once I have that, I think I could query the database to find the custom field value for that entry.
Any help would be appreciated.