Google-Maps and Play framework - google-maps

The user should enter a valid adress and click ok. Then a Google-Map should be shown. Then the user shoult simply say ok(if the wright place is shown in the map) or he should be able to change the adress (if the wrong place is shown in the map), by entering a new adress or by moving the pin on the map.
Is this possible with play framework?
And how can i get the gps-coordinates of the selected point?
Kind regards, joe

This can be done entirely client side using JavaScript and the GoogleMaps API, so you could build this in pure HTML if you wanted to! So, yes Play can easily support this.

Yes, this is possible given that the Google Maps API let's you do it. This is not something limited by Play, which in itself it only helps you create websites, but by the Maps API and what you can do with it.
In other words, you could do this with Play, Lift, Struts, Ruby or your own framework.

I just wrote this article/application using Scala, Play Framework and Google Maps--it might help you!
http://geeks.aretotally.in/location-based-play-framework-scala-google-maps-clustering-postgresql-and-anorm-appli

Related

Spider markers google map native

I would like to know if there is a solution for ionic 2 like this:
https://github.com/jawj/OverlappingMarkerSpiderfier
This is using the javascript api of google maps. I need a solution with ionic native maps.
Thanks
The marker clustering of the cordova-googlemaps-plugin (ionic google maps) has been working currently.
https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1006
If you are really interested in, please contact to me by e-mail.
If you are just interested in, please wait for a while. The feature will be public in a month (and for ionic 2).
Instead of using a spider markers, a CSS change can handle the situation. Like if multiple exist on single point multiple can be shifted up by some px.

How to use google maps api (java script) to display map in flash

i want google maps api (javascript) to display map but i want use flash(swf) file as front end is it possible? also i want create controls in flash and communctation with javascript to update map. I don't know whether it is possible or i am in completely wrong direction. Can any one help regarding this? One more thing, i planning to do it on windows xpas a demo project.
Please check official documentation of Google Map API for flash.
http://code.google.com/apis/maps/documentation/flash/intro.html
Try this tutorial - http://active.tutsplus.com/tutorials/actionscript/google-maps-api-for-flash/
This should guide you step by step.
hope this helps.

How do I remove 'Earth' button from Google Maps?

I'm using the Google Maps generator to create a few maps for a client. The maps embeded on the site are a bit small (255x176), so map real state is crucial. I've already removed the balloon, but can't find a way to remove the "Earth" view button from it (all newly generated maps come with it now, 4 views in total).
The annoying part is that the "Earth" view requires a Google Earth plugin to be used anyway, something the client could live without - me too.
Any advices there? Feedback will be greatly appreciated!
Cheers,
Wallace
You may customize the map controls using the MAPS API.
Visit http://code.google.com/apis/maps/documentation/javascript/controls.html#DefaultUI
Look for MapTypeControlOptions and pass appropriate map type you want to show.
Refer http://code.google.com/apis/maps/documentation/javascript/reference.html#MapTypeControlOptions
http://code.google.com/apis/maps/documentation/javascript/reference.html#MapTypeId
If using the default UI, you would get only the map types in G_DEFAULT_MAP_TYPES, which does not include the Earth map type (G_SATELLITE_3D_MAP).
This means your generator is adding this map type explicitly. So you should be able to simply look for G_SATELLITE_3D_MAP in the javascript you get from the generator, and remove references to it.
If you are still having troubles, can you provide a link to the map generator you are using?

Approaching a map based selection

I have a map of several counties I need to turn into a county select menu (i.e clicking Leicestershire will select Leicestershire.
I am using a php built system that this map will need to return the appropriate value to. I am thinking this will be a get in the url, checked for valid values in the backend.
How would you approach this? A html co-ordinate map? Some sort of Javascript? Flash?
I am aware all those solutions have one drawback or another. Does anyone know a better way of doing this? Or an existing opensource project?
Just an idea, if I read your problem correctly: I would personally use the Google Maps API for this. Plot each county onto your custom Google Map, then when you click each marker an info window could appear with "Select this County". Click the link and pass a value through the URL to your PHP script.
Used a html map system. Dreamweaver made it easy (first time I've used the design screen seriously)

Do i need use google maps api only to embed litle map with route calculator/display for only one destination?

Well i want to upgrade contact page with dynamic map showing location and give oportunity to calculate route for comapny headquatters. Id it necessery for such simple task use Google api? i mean here generating akey etc? Fo i have any other alternatives to google maps?
There's really no reason to mess with the API at all unless you need to customize the appearance or behavior of gmaps. Why not just use an iframe with a url of:
http://maps.google.com/?q=[you-url-encoded-address-here]
or better yet, set up a textbox and a 'get directions' button to redirect that frame to:
http://maps.google.com/maps?saddr=[their-address]&daddr=[your-address]
edit: this works well in modal dialog if you don't want the google logo sticking out like a sore thumb in your pageflow
You could probably embed directly with a specific URL that will configure it to have the destination you want.
By the way, well written answers are much more likely to receive useful responses here.
You could consider http://www.openlayers.org/ as an alternative to google maps.
In fact open layers can be used to add a Google map, or an OpenStreetMap map or a Bing map, etc.