The wordpress plugin is placed by doing this -

 {gmapfp id="1" zmap="10" wiki="2" hmap="700"}

Now, basically was obtaining the id number in the url or in the cookie, then how do you place it dynamically?

You cannot, the module/wordpress plugin takes the string before any output towards the frontend it is also hard created in the content and also you can't change it out dynamically around the front-finish. The only method to get it done would be to edit the wordpress plugin to accept id in the URL/Cookie should you produce some code I'm able to explain.