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

Can this be used using two different html files? #85

Open
miggymamba opened this issue Nov 3, 2014 · 4 comments
Open

Can this be used using two different html files? #85

miggymamba opened this issue Nov 3, 2014 · 4 comments

Comments

@miggymamba
Copy link

Hi,

My index.html contains a name , a latitude and a longitude. When I click on the link, the href must pass the name and the coordinates to my map.html so I can put a marker on my map. Is this possible? Thanks.

@azicchetti
Copy link
Owner

Il 03/11/2014 10:24, mrhwangmiyoung ha scritto:

Hi,

My index.html contains a name , a latitude and a longitude. When I click
on the link, the href must pass the name and the coordinates to my
map.html so I can put a marker on my map. Is this possible? Thanks.

Hi,
yes, it's definitely possible.

You can use a separate page (map.html) in ajax mode, with a href such as
"map.html?la=XX.XXXXXX&ln=YY.YYYYYY", or a local page with a certain id
(#map) with a href such as "#map?la=XX.XXXXXX&ln=YY.YYYYYY".

Cheers,
Andrea

@miggymamba
Copy link
Author

Hi andrea,

I'll try to do implement it. I am still new to Web Technologies. I'll get back to you. I hope you can help me. Thanks.

@miggymamba
Copy link
Author

Hi Andrea,

It seems that I can't make it work. I have this:

"map.html?param=value&param2=value" 

then I have this in my router:

"map: function (type,match,ui){
     //loading('show');
     var params=router.getParams(match[0]);
      console.log("mapRouter: "+type+" "+match[1]);
      console.log(params);

 }"  

There is no log in the console. Any ideas why this happens? Thanks.

@azicchetti
Copy link
Owner

Hi,
here you can fine a working example using gmaps and jQM ajax mode: https://dl.dropboxusercontent.com/u/39794383/map.zip

It can be refined, it should take into account page caching and so on, but it's still a good starting point.
Hope it can help somehow.

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

No branches or pull requests

2 participants