Group Abstract Group Abstract

Message Boards Message Boards

1
|
8.8K Views
|
3 Replies
|
1 Total Like
View groups...
Share
Share this post:

how to get smooth map picture and text in GeoGraphics

Posted 10 years ago

The following code produces a Map with a point and some text added:

test = GeoGraphics[{PointSize[Large], Black, Point[{3.5, 52}], 
   Text["Text on a Map", GeoPosition[{52, 3.5}], {0, 1}, {0, 1}]}, 
  Frame -> True, GeoRange -> {{50, 56}, {0, 7}}, 
  GeoProjection -> "Equirectangular", ImageSize -> 1000]

This picture is transported to a webpage by:

CloudExport[test, "HTML", Permissions -> "Public"]

The result is a lower quality of the map and a much lower quality of the "text" at the point in the map.

Is there a way to improve picture quality when cloud-deployed. Is it possible to put the overlay of text in a svg file and use the bitmap as a background. This would help when a web-browser user zooms in. Any other suggestion to improve image quality are very welcome. btw maps on the desktop look much smoother.

3 Replies

It seems very fuzzy indeed. I also noted that when you export the image to gif and then import it back the image seems somewhat better.

POSTED BY: l van Veen

Does anyone have the same experience (the GeoGraphic maps being more fuzzy when presented in a cloud webpage? )

Check this google api to generate a map

URLExecute["http://maps.googleapis.com/maps/api/staticmap", {"center" \
-> "51.5,5.4", "zoom" -> 12, "size" -> "800x500", 
  "maptype" -> "roadmap", "scale" -> 2, 
  "markers" -> "color:blue|label:C|51.5,5.4" , 
  "path" -> 
   "color:0x0000ff|weight:2|fillcolor:0xFFFF0033|51.5,5.4|51.45,5.35|\
51.5,5.45|51.5,5.4"}, "Method" -> "GET"]

The most important part is the "scale" parameter. This increases the number of pixels returned. Options are 1 or 2 (4 if you subscribe).

GeoGraphics uses openstreetmap. But GeoGraphics does not have a scale parameter. Anyone for a workarround to get higher resolution maps.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard