Cool Infobox and plot polygons through xml ....in bing maps , pure javascript - javascript

I have just started with bing maps and wish to accompilish two things for my project .
a) define layers/shapes by loading data via xml
B) Have a tooltip/infobox like this site:-
check the source file here

For custom infoboxes in Bing Maps there are two options. The first is to use the built in infobox control and set the html content property. I have a blog post on how to do this here: http://rbrundritt.wordpress.com/2011/11/08/simple-custom-infoboxes-in-bing-maps-v7/
The second method is to use the custom infobox module I created for Bing Maps V7 here: http://bingmapsv7modules.codeplex.com/wikipage?title=Custom%20Infobox%20Control

As for XML data, if it is in GeoRSS or GML format then you can use this module:
http://bingmapsv7modules.codeplex.com/wikipage?title=GeoRSS%20Plugin
If it is in GPX format you can use this module:
http://bingmapsv7modules.codeplex.com/wikipage?title=GPX%20Parser

For tooltips you can take a look at this blog post: http://rbrundritt.wordpress.com/2011/11/21/pushpin-tooltips-in-bing-maps-v7/

Related

Leaflet translate coordinates into street addresses

I am creating an app where I use a leaflet map. I was wondering if there is any extern library that I can use to translate coordinates into street addresses? Im using Angular 6.
Here is a really simple possibility by using Nominatim. It's a tool used by OpenStreetmap. Here is a link for all the details:
https://wiki.openstreetmap.org/wiki/Nominatim
And here is an example on how you could use it:
$.get('https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=47.217954&lon=-1.552918', function(data){
console.log(data.address.road);
});
You will only need to replace coordinates with variable like this:
lat='+ latitude +'
And if you want a plugin: https://esri.github.io/esri-leaflet/examples/reverse-geocoding.html
What you are asking for is called Geocoding. For Leaflet there is a plethora of plugins to accomplish this, all of them listed at https://leafletjs.com/plugins#geocoding. Note that some plugins, such as https://github.com/perliedman/leaflet-control-geocoder, are not limited to one geocoding provider.

Best way to implement google maps

I found two way to implement google maps.
The First One
<script src = "http://maps.googleapis.com/maps/api/js"></script>
The Second One
<script type="text/javascript" src="http://www.google.com/jsapi?key=....key"></script>
my questions :-
1- What is difference between them?
2- Can I download (save) a part of google maps (my country map or city) to my localhost?
For your second question
By Broswer Google maps can only be executed using internet. Eventually local copy are actually not allowed and above all does not work. Google Maps can used only as a service and not as a local library.
For Mobile you can access (and also edit) your maps locally eg see this
In HTML5, you no longer need to define the type attribute for JS includes, so this format works:
<script src = "http://maps.googleapis.com/maps/api/js"></script>
Additionally, you are referencing the v3 of the Google Maps API with the above URL - see here in their documentation.
First question: This was answered by #staypuftman.
Second question: You may save a local copy of a part of google maps using Google Static Maps which will return a value as an image file.

Does Google Map offer REST api service?

What I want to do is to load a map with predefined markers on it. I could write code in map initialization to do this. I wonder if google offer REST api that I call it instead of coding to load the map and its predefined markers?
Of course there is! heres a link to their JS api: https://developers.google.com/maps/documentation/javascript/
Read till the bottom, there's a small example.

Removing Places from OSM

Doe is exists a way to remove all the places from the OSM map? Also like shops, bars, restorations, hotels etc.
I wish to use a maps with a less info. Is it possible to do this from the original OSM server? Maybe like a option in URL or something else? I use Leaflet library for my project, maybe some option in it?
I wished to have it like in GMAPS API:
new google.maps.Map(map_div,{
styles:[{
elementType:'all',
featureType:'poi',
stylers:[{
visibility:'off'
}]
}]});
Over JS or over extra URL, so or so, but without places.
The main OSM service provides only one rendering, and you can't change that rendering. Instead, you could:
Render your own tiles - you could design them in Tilemill and host them using Tilestache.
Use maps provided by a third party, such as these Mapbox maps, or opencyclemap, or...

How do I get traffic control for my Google Map object?

I have set my Google Map object to view as a ROADMAP, but there is no traffic options like there is on the regular Google Maps. Below is the control I am trying to get. Is this possible via the map options in the API? I tried looking in the docs but there is nothing there for that (unless I am missing something).
You can create a custom control as shown on this example from the documentation.
Here is an example that shows embedding a traffic control onto the map.
http://pietervogelaar.nl/google-maps-api-v3-traffic-toggle-button/

Categories