Put several Google Maps on page using Symfony and sfEasyGMapPlugin - google-maps

I'm using Symfony 1.2.9 and sfEasyGMapPlugin 3.0.0
I need to put two gmaps on one page.
I've made custom ma name and DIV's id for each map. But I still can't make it work. Only second map is shown. The first one is not created.
Does anybody knows how to make them work using sfEasyGMapPlugin?

One of the TODO items for sfEasyGMapPlugin is to "correct javascript files that suppose that the map's javascript object is called 'map'".
My guess is that, because of this problem, you can only refer to one map object per page. You could try finding where 'map' is hardcoded and replace it with $gMap. I haven't used the plugin myself, so I can't say for sure. I've only used the Google Maps API directly with Symfony. Hope that helps.

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.

Google embedded map not showing route with selected options (eg. avoid toll/highway)

When creating a map with options selected like avoid toll road or highway, the embedded map shows the fastest way instead the previously calculated route.
Is there any key/value pair to add to iframe's source to turn on this options? The API has this options however ot doesn't work here: ...&avoid=tolls|highways
Example: https://goo.gl/maps/cyY4y
EDIT:
When embedding, the options are added to the source but ignored. If a proper API key is added and these options are added with API options, it works.
This worked for me
https://www.google.com/maps/embed/v1/directions?
origin=2151+Fót,+Fehérkő+utca+2,+Hungary
&destination=Brezova-Gokartland,+Visonta,+Brezova+tanya+3271,+Hungary
&key=MY_KEY&avoid=tolls|highways

Convert google map v2 custom overlay to v3 custom overlay

I have been doing so much research and yet to find the exact answer to help me. I need to convert my map at http://www.uaf.edu/campusmap/ from V2 to V3 so I can try to combine it with my fusion tables. It uses tiles made by Map Tiler. Is there anyone who can help me out?
I guess you need to port the whole map to V3 and use Custom Map Types.
BTW, you're loading the API twice, once from http://www.uaf.edu/files/campusmap/ and then again from http://www.uaf.edu/files/campusmap/campusmap-122311.html -- which is loaded in an iframe. Probably better to remove one of them, I think you can get rid of the first one.
I think there are two main things you'll need to worry about when converting to v3:
GTileOverlay doesn't exist in v3. You can use Custom Map Types, as per the pp.
To do this, you'll want to make an ImageMapType (see the docs). You'll then need to add this to the Map.overlayMapTypes MVCArray (which will display it above the base map - Map reference).
There's nothing like GDownloadUrl and GXml for downloading and parsing an XML document in v3. You'll need to use a generic library like jQuery to help downloading your marker locations.

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)